|
-
Oct 19th, 2012, 01:39 PM
#1
[RESOLVED] items in Dictionary(Of TKey, TValue) or List, To Sql Server table in one call?
I'm using VS 2005, i'll be moving info from a Dictionay to Sql Server table, i can do it row by row (1 insert command by item), but i have almost 1000 files loaded with 300.000+ records and i'm implementing different way to make this faster (table indexes, intermediate tables, etc..). One thing that would make all this faster would be a direct copy from dict/list/array to sql server table, is it possible? i could join/concat all these 1000 records (3 fields each) and send to db something like:
Insert...
Select ...
Union all
Select
Union All
Select..
but as you can see this this doesn't look very nice, i doubt there is another way but just in case, if anybody knows, it would be nice.
The reason i need C# between the files and the table is because much data processing is done in C#, data is not inserted into db just as it comes from files.
Good old DTS packages could do the job but i would have to replace this C# App by the DTS pack, and also im using Sql Server 2008 (DTS's have been deprecated, i don't understand why)
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|