From: Karl S. <web...@st...> - 2003-03-13 17:40:26
|
Hi all, as a newbie to .net i installed the .net sdk from microsoft, your latest .net-provider and sharpdevelop. Firebird is 1.02 Trying some minimalistic examples from your help-file, i have a problem with the insert statement. select-example works fine, but when I try this insert-example, there's just nothing in the database. No new recordset, nothing. The example works without any error, when i invoke it. Any hints Thanks KS 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(); myConn.Close(); } |