Re: [C#] Problem for Update
Posted by: John Payne
Date: November 08, 2006 02:01PM

Assuming that this._dbconn is a valid connection object- is the connection open ? I am surprised that you get no exceptions.

eg:-

public void InsertRow(string myConnectionString)
{
// If the connection string is null, use a default.
if(myConnectionString == "")
{
myConnectionString = "Database=Test;Data Source=localhost;User Id=username;Password=pass";
}
MySqlConnection myConnection = new MySqlConnection(myConnectionString);
string myInsertQuery = "INSERT INTO Orders (id, customerId, amount) Values(1001, 23, 30.66)";
MySqlCommand myCommand = new MySqlCommand(myInsertQuery);
myCommand.Connection = myConnection;
myConnection.Open();
myCommand.ExecuteNonQuery();
myCommand.Connection.Close();
}

Options: ReplyQuote


Subject
Written By
Posted
October 31, 2006 05:38PM
Re: [C#] Problem for Update
November 08, 2006 02:01PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.