Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 help with updating changes

Author  Topic 

billybob001
Starting Member

2 Posts

Posted - 2007-11-29 : 11:39:14
I have some code to hack in c#..
I have a database and when a form (C#) is loaded a copy of the table is made in a DataTable object. The form has a list box showing just the one column of info from the local DataTable.
On the form it is possible to change a record, delete a record and add a record. These are all done in the local table.

The question, how do i send these changes back to the database. Currently it deletes the lot and copies all the local table values in. How do only do the affected row, UPDATE, INSERT etc

Hommer
Aged Yak Warrior

808 Posts

Posted - 2007-11-29 : 12:24:24
Let me recap what you have in your app.

You have a window/web app that got a set of data from a sql db.
The app has the functionality to add/delete/change these data in its locally. Then it will upload all the changes to the db and replace the db data in batch at certain time.

Now you want to replace the batch "upload" with real time insert/update/delete.

The answer is to use stored procedures to do the job. The examples are everythwere.
Go to Top of Page
   

- Advertisement -