Click here to Skip to main content
15,918,742 members
Home / Discussions / C#
   

C#

 
Generaladding a dataset to a database Pin
(Steven Hicks)n+128-Apr-04 11:16
(Steven Hicks)n+128-Apr-04 11:16 
GeneralRe: adding a dataset to a database Pin
Heath Stewart28-Apr-04 11:26
protectorHeath Stewart28-Apr-04 11:26 
See the SqlDataAdapter documentation in the .NET Framework SDK. Make sure the SelectCommand and InsertCommand properties are set (at least, for new items only) and call SqlDataAdapter.Fill on the DataSet. The table and column definitions must match up with your SQL tables or stored proc parameters, or use some aliasing (where applicable) in your commands. Typed DataSet can greatly help in this situation.

Also, make sure you do not call DataSet.AcceptChanges or DataTable.AcceptChanges before you call Fill, otherwise nothing is sent. If you want to improve performance by decreasing bandwidth loads, call DataSet.GetChanges to get a DataSet with just the changes excluding any unmodified data (which really wouldn't apply if your DataSet contains all new records, but this is handy to know).

 

Microsoft MVP, Visual C#
My Articles
GeneralFree Form Controls Pin
Jon G28-Apr-04 9:58
Jon G28-Apr-04 9:58 
GeneralRe: Free Form Controls Pin
Heath Stewart28-Apr-04 10:01
protectorHeath Stewart28-Apr-04 10:01 
GeneralRe: Free Form Controls Pin
Jon G28-Apr-04 10:08
Jon G28-Apr-04 10:08 
GeneralRe: Free Form Controls Pin
Jon G28-Apr-04 10:14
Jon G28-Apr-04 10:14 
GeneralRe: Free Form Controls Pin
Heath Stewart28-Apr-04 10:15
protectorHeath Stewart28-Apr-04 10:15 
GeneralRe: Free Form Controls Pin
..Hubert..28-Apr-04 22:17
..Hubert..28-Apr-04 22:17 
GeneralRE: Web Service Startup Pin
mjmcinto28-Apr-04 9:12
mjmcinto28-Apr-04 9:12 
GeneralRe: RE: Web Service Startup Pin
Jesse Squire28-Apr-04 9:46
Jesse Squire28-Apr-04 9:46 
GeneralRe: RE: Web Service Startup Pin
mjmcinto28-Apr-04 10:39
mjmcinto28-Apr-04 10:39 
GeneralRe: RE: Web Service Startup Pin
Heath Stewart28-Apr-04 11:19
protectorHeath Stewart28-Apr-04 11:19 
GeneralRe: RE: Web Service Startup Pin
je_gonzalez28-Apr-04 11:03
je_gonzalez28-Apr-04 11:03 
GeneralRe: RE: Web Service Startup Pin
mjmcinto28-Apr-04 11:25
mjmcinto28-Apr-04 11:25 
GeneralRe: RE: Web Service Startup Pin
mjmcinto29-Apr-04 4:00
mjmcinto29-Apr-04 4:00 
QuestionHow can I change (Windows form) ListView item height? Pin
Arnaud Bui28-Apr-04 7:09
Arnaud Bui28-Apr-04 7:09 
AnswerRe: How can I change (Windows form) ListView item height? Pin
Heath Stewart28-Apr-04 8:25
protectorHeath Stewart28-Apr-04 8:25 
GeneralQuestion on TabControl and context menu Pin
Flack28-Apr-04 6:57
Flack28-Apr-04 6:57 
GeneralRe: Question on TabControl and context menu Pin
Heath Stewart28-Apr-04 8:17
protectorHeath Stewart28-Apr-04 8:17 
Generallive video Pin
Anonymous28-Apr-04 6:46
Anonymous28-Apr-04 6:46 
GeneralRe: live video Pin
Heath Stewart28-Apr-04 8:14
protectorHeath Stewart28-Apr-04 8:14 
GeneralRe: live video Pin
Anonymous29-May-04 8:16
Anonymous29-May-04 8:16 
Generalremoting : singleton vs singlecall Pin
Anonymous28-Apr-04 5:57
Anonymous28-Apr-04 5:57 
GeneralRe: remoting : singleton vs singlecall Pin
Heath Stewart28-Apr-04 6:27
protectorHeath Stewart28-Apr-04 6:27 
Questionhow do i loop controls on webpage Pin
robmays28-Apr-04 5:25
robmays28-Apr-04 5:25 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.