From: James G. <Ja...@jn...> - 2003-08-22 09:10:32
|
I am trying to insert records into a table using C#builder and firebird.net provider 1.5. The code runs but when I check the table no updates have been commited. Could someone let me know where I have gone wrong? Thanks, James Gill fbConnection1.Open(); FirebirdSql.Data.Firebird.FbCommandBuilder builder = new FirebirdSql.Data.Firebird.FbCommandBuilder(fbDataAdapter1); fbDataAdapter1.Fill(dataSet1,"TABLE1"); DataTable TABLE1 = dataSet1.Tables["TABLE1"]; for(int a = 0;a <= 100;++a) { DataRow newrow = TABLE1.NewRow(); newrow["NAME"] = "Test Me "+a.ToString(); newrow["IDNUMBER"] = a; newrow["FIELD1"] = a; TABLE1.Rows.Add(newrow); } fbCommand2 = builder.GetUpdateCommand(); textBox1.Text = fbCommand2.CommandText; fbDataAdapter1.Update(TABLE1); fbConnection1.Close(); |