From: Carlos G. A. <car...@te...> - 2003-03-13 19:19:57
|
Hello: You only need to add a commit before close connection: public void InsertRow(string myConnectionString) { // If the connection string is null, use a default. if(myConnectionString == "") { myConnectionString = "Database=C:\\PROGRAM FILES\\FIREBIRD\\EXAMPLES\\EMPLOYEE.GDB;User=SYSDBA;Password=masterkey;Diale ct=3;Server=localhost"; } FbConnection myConn = new FbConnection(myConnectionString); myConn.Open(); FbTransaction myTxn = myConn.BeginTransaction(); string myInsertQuery = "INSERT INTO PROJECT(proj_id, proj_name, product) Values('FBNP', '.Net Provider', 'N/A')"; FbCommand myFbCommand = new FbCommand(myInsertQuery, myConn, myTxn); myFbCommand.ExecuteNonQuery(); myTxn.Commit(); <--- myConn.Close(); } -- Best Regards Carlos Guzmán Álvarez Vigo-Spain "No tengo dones especiales.Sólo soy apasionadamente curioso" Albert Einstein, científico. |