[英]A WHERE statement in my SqlDataSource causes invalid character exception (ORA-00911), why?
I'm using Oracle developer tools and my generated select
command is: 我正在使用Oracle开发人员工具,并且生成的select
命令是:
SelectCommand = "SELECT "FIRSTNAME" FROM "USERS" WHERE ("USERNAME" = ?)">`
Then I removed all "
然后,我删除了所有"
and replaced them with a single quote: '
. 而取而代之的是一个单引号: '
。
Then I get that error (mentioned in the title). 然后我得到那个错误(标题中提到)。
Any suggestions how I can make it work? 有什么建议可以使我工作吗?
You should be using like this 你应该这样使用
select firstname from users where username='%?'
Just replace the value in the where condition with your live values. 只需用您的实时值替换where条件中的值即可。 Note down the syntax of SQL 记下SQL的语法
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.