sql命令未正确结束问题
我的VB程序有以下代码
strSQL = " SELECT * FROM signup " _
& " WHERE year = " & cmbYear.Text & " AND cmbissue = '" & cmbIssue.Text & "' "
OracleIsExist gManager.gconSignUp, gManager.gOraSignUp
Set tRst = gManager.gconSignUp.Execute(strSQL, , adCmdText)
If tRst.RecordCount < 1 Then
——————————
运行后出现ora-00933 sql命令未正确结束问题 请问怎么解~~~~
[解决办法]
'year是系统保留字,要用方括号括起来strSQL = " SELECT * FROM signup " _ & " WHERE [year] = " & cmbYear.Text & " AND cmbissue = '" & cmbIssue.Text & "' "
[解决办法]
strSQL = " SELECT * FROM signup " _
& " WHERE [year] = " & cmbYear.Text & " AND cmbissue = '" & cmbIssue.Text & "' "