Sql Query抛出一个ODBCException:

时间:2014-06-06 09:52:07

标签: mysql c#-4.0

以下Sql Query抛出一个ODBCException:

 cmd.CommandText = "Select Max(" + primaryKey + ") from " + tableName + " where " + primary_key + " >= " + strt_rng[ftr_index] + " and " + primary_key + " < " + end_rng;

实际查询如下:

SELECT MAX(FtreId) FROM tbmftre WHERE FtreId >=101 AND FtreId < 1000 

我在上述查询中是否缺少引号?

0 个答案:

没有答案