2
Answers

How to check whether database or table exist?

try abc

try abc

16y
13.5k
1
    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
            {
             
            }
Answers (2)