|
-
Nov 3rd, 2005, 11:43 PM
#1
Thread Starter
Frenzied Member
saving data from a datagrid to a database
Hello,
I have a datagrid which l want to save the contents to the database. I am not sure how to do this. Would l have to save one row at a time, or can l save everything and at once. I am using C# with SQL Server 2000. I normally write stored procedures for database operations. But with the datagrid I am not sure how this is done.
Some code examples would be very grateful.
Thanks in advance,
Steve
-
Nov 4th, 2005, 04:06 AM
#2
Re: saving data from a datagrid to a database
That depends on how you populated the datagrid and dataset in the first place. If you used a dataadapter, then any changes you made in the datagrid should be reflected in your dataset. You can then run the dataadapater's update method and the rows which have been changed will be updated back to the database.
If that is not the case then you'll need to tell us how you populated.
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
|