I’m adding a record into remote mysql database and after that I want to check if it’s added – So i want to try to select this particular record.
My code:
public void Select(string filename)
{
string query = "SELECT * FROM banners WHERE file = '"+filename+"'";
//open connection
if (this.OpenConnection() == true)
{
//create command and assign the query and connection from the constructor
MySqlCommand cmd = new MySqlCommand(query, connection);
//Execute command
cmd.ExecuteNonQuery();
//close connection
this.CloseConnection();
}
}
How to check the response from the server? Or selected records?
It’s c# windows forms app.
Try this:
Check this URL for more info: http://msdn.microsoft.com/en-us/library/haa3afyz(v=vs.100).aspx