以下是我要运行的查询:
SELECT COUNT(*) FROM Users WHERE name = @name AND pwd = @pwd;
我的连接字符串:
Provider=OraOLEDB.Oracle;User Id = HR; Password = hr;
规格:
我尝试过的步骤:
错误我得到了:
ORA-00936:缺少表达
答案 0 :(得分:1)
在Oracle中,参数的前缀为:
而不是@
。请改用:
SELECT COUNT(*) FROM Users WHERE name = :name AND pwd = :pwd;