Subject C# INSERT not going thru
Author James Dunkley
Hello;

this code below runs without error, it looks like it does Insert but then checking database from console verifies nothing has happened.

Sorry I'm new,

thank all of you in advance!







public void InsertRow(string myConnectionString)

{

// If the connection string is null, use a default.

if(myConnectionString == "")

{

myConnectionString = "Database=DATA.FDB;User=me;Password=pass;Dialect=3;Server=host";

}



FbConnection myConn = new FbConnection(myConnectionString);



myConn.Open();





FbTransaction myTxn = myConn.BeginTransaction();

string myInsertQuery = "INSERT INTO INFO(name, phone) Values ('luutf', 'uytd')";

FbCommand myFbCommand = new FbCommand(myInsertQuery, myConn, myTxn);



myFbCommand.ExecuteNonQuery();

myConn.Close();

}




---------------------------------
Post your free ad now! Yahoo! Canada Personals


[Non-text portions of this message have been removed]