I have a DataSet which I am holding in .NET and I would like to know the quickest way to get the DataSet in to a Table on SQL Server?
Any sample code would be great.
How many tables you have in dataset?
Fastest and easiest way to do it is probably using Data Adapter.
Thanks
|||Only one table, with over 1,000,000 records|||And How you generate this data in your DataSet it is loaded from somewhere?
Fastest way will be to save it to file and next import to SQL using SSIS package or bulk copy command.
You can also try DataAdapter but
Thanks
it|||And How you generate this data in your DataSet it is loaded from somewhere?
Fastest way will be to save it to file and next import to SQL using SSIS package or bulk copy command.
You can also try DataAdapter but
Thanks
it is|||And How you generate this data in your DataSet it is loaded from somewhere?
Fastest way will be to save it to file and next import to SQL using SSIS package or bulk copy command.
You can also try DataAdapter but it
Thanks
|||Hi CopperMill,
I agree that you can use SSIS to import data. You can also use bcp utility to perform fast bulk copy.
The bcp utility bulk copies data between an instance of Microsoft SQL Server 2005 and a data file in a user-specified format. The bcp utility can be used to import large numbers of new rows into SQL Server tables or to export data out of tables into data files. Except when used with the queryout option, the utility requires no knowledge of Transact-SQL. To import data into a table, you must either use a format file created for that table or understand the structure of the table and the types of data that are valid for its columns.
For more information, please check
http://msdn2.microsoft.com/en-us/library/ms162802.aspx
If the data you need to insert has to be stay in the DataSet, The only way I can see is to use a SqlDataAdapter
HTH. If this does not answer your question, please feel free to mark the post as Not Answered and we will look into it again. Thanks!
No comments:
Post a Comment