asp.net 使用 Mysql数据库的MySqlParameter错误?? 20
代码如下:stringtable=ConfigurationManager.AppSettings["table"].ToString();stringSqlSelect...
代码如下:
string table = ConfigurationManager.AppSettings["table"].ToString();
string SqlSelect = "SELECT * FROM ?table where INBOXID=(select min(INBOXID) from ?table2)";
MySqlParameter[] mysqlpar ={ new MySqlParameter("?table", table), new MySqlParameter("?table2",table) };
错误:
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''t_inbox001' where INBOXID=(select min(INBOXID) from 't_inbox001')' at line 1 展开
string table = ConfigurationManager.AppSettings["table"].ToString();
string SqlSelect = "SELECT * FROM ?table where INBOXID=(select min(INBOXID) from ?table2)";
MySqlParameter[] mysqlpar ={ new MySqlParameter("?table", table), new MySqlParameter("?table2",table) };
错误:
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''t_inbox001' where INBOXID=(select min(INBOXID) from 't_inbox001')' at line 1 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询