|
-
August 5th, 2006, 03:37 PM
#1
insert dataset into database
is there a way to insert values (many rows) from dataset to the dataBase?
thnaks in advanced.
-
August 6th, 2006, 09:38 PM
#2
Re: insert dataset into database
There are several approaches you can take.
If you need to log for example any row that fails, you could use the DataAdapter's Update method call on the database. Keep in mind though that if you have a large amount of rows, this will be extremely slow since you will be executing a sql command for each row.
If you just want to do "all or none" import of data, look into SqlBulkCopy. Extremely fast and should be used if you have to import many rows.
If my posts have helped you, please rate them. Ratings give me that warm, fuzzy feeling of having helped someone out 
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
|