Click here to Skip to main content
15,894,017 members
Home / Discussions / C#
   

C#

 
AnswerRe: Update the dataset into the original database Pin
Christian Graus17-Jan-06 9:21
protectorChristian Graus17-Jan-06 9:21 
GeneralRe: Update the dataset into the original database Pin
Sasuko17-Jan-06 9:28
Sasuko17-Jan-06 9:28 
GeneralRe: Update the dataset into the original database Pin
Christian Graus17-Jan-06 9:37
protectorChristian Graus17-Jan-06 9:37 
GeneralRe: Update the dataset into the original database Pin
Sasuko17-Jan-06 9:53
Sasuko17-Jan-06 9:53 
GeneralRe: Update the dataset into the original database Pin
Christian Graus17-Jan-06 9:56
protectorChristian Graus17-Jan-06 9:56 
GeneralRe: Update the dataset into the original database Pin
Sasuko17-Jan-06 10:19
Sasuko17-Jan-06 10:19 
GeneralRe: Update the dataset into the original database Pin
Christian Graus17-Jan-06 10:22
protectorChristian Graus17-Jan-06 10:22 
GeneralRe: Update the dataset into the original database Pin
Wjousts17-Jan-06 10:20
Wjousts17-Jan-06 10:20 
Of course it's INSERT INTO...
You need something like this:

MyDataAdapter.InsertCommand = new OleDbCommand("INSERT INTO MyTable (MyField1, MyField2, ....) VALUES (?, ?, ...)",MyConnection);
MyDataAdapter.InsertCommand.Parameters.Add(new OleDbParameter("MyField1",int,0,"MyDataTableField1");
...


And so on. When you do the update the DataAdapter knows which rows are new and substitutes the parameters (the ? in the SQL statement) with the real values in your DataTable according to the mappings in the InsertCommands Parameters.
You might also want to do the Update and Delete commands as well if you actually want updates and deletes to be possible.
QuestionDetecting Video format Pin
amitmores17-Jan-06 3:57
amitmores17-Jan-06 3:57 
AnswerRe: Detecting Video format Pin
User 665817-Jan-06 4:17
User 665817-Jan-06 4:17 
Questionavoid having this drawing bad effect Pin
Sasuko17-Jan-06 3:51
Sasuko17-Jan-06 3:51 
AnswerRe: avoid having this drawing bad effect Pin
CWIZO17-Jan-06 4:39
CWIZO17-Jan-06 4:39 
QuestionCreate an object instance using System.Type Pin
silverair17-Jan-06 3:02
silverair17-Jan-06 3:02 
AnswerRe: Create an object instance using System.Type Pin
tarasn17-Jan-06 3:09
tarasn17-Jan-06 3:09 
GeneralRe: Create an object instance using System.Type Pin
silverair17-Jan-06 4:37
silverair17-Jan-06 4:37 
GeneralRe: Create an object instance using System.Type Pin
Robert Rohde17-Jan-06 4:57
Robert Rohde17-Jan-06 4:57 
QuestionExcel Macro from C# Pin
pssuresh17-Jan-06 2:39
pssuresh17-Jan-06 2:39 
QuestionColor a row in a Datagrid, is there a solution that works with DataView? Pin
Cesa3717-Jan-06 2:28
Cesa3717-Jan-06 2:28 
AnswerRe: Color a row in a Datagrid, is there a solution that works with DataView? Pin
Robert Rohde17-Jan-06 5:01
Robert Rohde17-Jan-06 5:01 
AnswerRe: Color a row in a Datagrid, is there a solution that works with DataView? Pin
Cesa3717-Jan-06 6:46
Cesa3717-Jan-06 6:46 
Questionerror: key already exists Pin
dhol17-Jan-06 2:20
dhol17-Jan-06 2:20 
QuestionIs it possible to create a dialog represent .NET JIT dialog when application error? Pin
god4k17-Jan-06 2:06
god4k17-Jan-06 2:06 
AnswerRe: Is it possible to create a dialog represent .NET JIT dialog when application error? Pin
Judah Gabriel Himango17-Jan-06 5:02
sponsorJudah Gabriel Himango17-Jan-06 5:02 
QuestionConversion to xml Pin
bidisha_tina17-Jan-06 2:03
bidisha_tina17-Jan-06 2:03 
AnswerRe: Conversion to xml Pin
exhaulted17-Jan-06 2:24
exhaulted17-Jan-06 2:24 

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.