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
 UPDATE, INSERT I Dunno

Author  Topic 

billybob001
Starting Member

2 Posts

Posted - 2007-11-30 : 06:06:13
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 objeect. 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

jackv
Master Smack Fu Yak Hacker

2179 Posts

Posted - 2007-12-04 : 12:20:06
Why do you store it in a local table? Why not use the SQL methods in .Net and execute Stored procedures?Does only 1 person use the form or do multiple users?

Jack Vamvas
--------------------
Search IT jobs from multiple sources- http://www.ITjobfeed.com
Go to Top of Page

sshelper
Posting Yak Master

216 Posts

Posted - 2007-12-04 : 12:23:09
If you are using Visual Studio .Net 2005, you can use a SqlDataSource that will take care of the INSERT, UPDATE and DELETE functions (of course you have to set the commands for each of these).

SQL Server Helper
http://www.sql-server-helper.com
Go to Top of Page
   

- Advertisement -