syntax error System.Data.SQLite.SQLite3.Prepare

数据库 码拜 9年前 (2015-01-03) 2559次浏览 0个评论

VS项目运行功能都能实现,但是输出里有个这个报错near “in”:   syntax error  ,数据库是 SQLite ,怎么解决?

near “in”:  syntax error 异常信息:

在 System.Data.SQLite.SQLite3.Prepare(SQLiteConnection cnn, String strSql, SQLiteStatement previous, UInt32 timeoutMS, String& strRemain)
在 System.Data.SQLite.SQLiteCommand.BuildNextCommand()
在 System.Data.SQLite.SQLiteCommand.GetStatement(Int32 index)
在 System.Data.SQLite.SQLiteDataReader.NextResult()
在 System.Data.SQLite.SQLiteDataReader..ctor(SQLiteCommand cmd, CommandBehavior behave)
在 System.Data.SQLite.SQLiteCommand.ExecuteReader(CommandBehavior behavior)
在 XinGe.Kernel.Data.SQLiteHelper.ExecuteReader(SQLiteConnection conn, String cmdText, SQLiteParameter[] parameters)

—- 10分

是不是SQL语句的问题,说了IN附近,检查下,报错在这里,是不是空格什么的,打出SQL放数据库试下就知道了。。

—-
SELECT * FROM  表名 WHERE State = “正常” and not in (6162)   这句话对不对
—-

引用 1 楼 fate1987 的回复:

是不是SQL语句的问题,说了IN附近,检查下,报错在这里,是不是空格什么的,打出SQL放数据库试下就知道了。。

正在下载..

—- 10分

SELECT * FROM  表名 WHERE State = “正常” and  XXX not in (6162)

CodeBye 版权所有丨如未注明 , 均为原创丨本网站采用BY-NC-SA协议进行授权 , 转载请注明syntax error System.Data.SQLite.SQLite3.Prepare
喜欢 (0)
[1034331897@qq.com]
分享 (0)

文章评论已关闭!