我有以下select命令:
Dim nCmdSel As SQLite.SQLiteCommand = cnApp.CreateCommand
With nCmdSel
.CommandText = "SELECT word, priority FROM mf WHERE word LIKE " & _
"@word% " & _
"ORDER BY priority DESC LIMIT 100"
.Parameters.Add("@word", DbType.String).Value = sThisWord
End With
r = nCmdSel.ExecuteReader()
我收到错误
"SQL logic error near ORDER:"
但我不知道我犯了什么错误。 有人看到了吗?
谢谢!
答案 0 :(得分:0)
知道了:
我需要这样做:
.Parameters.Add("@word", DbType.String).Value = sThisWord & "%"