以下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
我在上述查询中是否缺少引号?