Hi there,
I am able to sccessfully open a connection to MySql db. but when I try to execute the following code, I get an error
however, if I hardcode the table name like so, it works correctly.
I am able to sccessfully open a connection to MySql db. but when I try to execute the following code, I get an error
Code:
string tableName="images";
OdbcConnection MyConnection = new OdbcConnection(MyConString);
MyConnection.Open();
OdbcCommand MyCommand = new OdbcCommand("DROP TABLE IF EXISTS"+tableName,MyConnection);
however, if I hardcode the table name like so, it works correctly.
Code:
OdbcCommand MyCommand = new OdbcCommand("DROP TABLE IF EXISTS images",MyConnection);