How to check whether database or table exist?
Hello,,
I want to to check whether the Database is already exist in to the Specified Database server.. and also for table.. Is anybody knows the query for this?? i alreasy use the following query . but as the ExecuteNonQuery() only return the rows affeted by the Insert, Update and Delete query. Plz Help
query = "show tables from db_micro_structure;
com = new MySqlCommand(query, myConnection);
try
{
myConnection.Open();
MessageBox.Show(com.ExecuteNonQuery().ToString());
myConnection.Close();
}
catch
{
}