C#-syntax错误:'TAG'运算符后缺少操作数。 [英] C# -syntax error: missing operand after 'TAG' operator.
本文介绍了C#-syntax错误:'TAG'运算符后缺少操作数。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
Hi,
I am getting Error while i am forming the statement.
Mycolname = "WIN TAG";
sqlcmd = ( Stundetno = '101') and ( WIN TAG = 'A1' )
DataRow[] result = dt.Select(sqlcmd); // Error : Syntax error: Missing operand after 'TAG' operator.
what is the Error...?
我尝试过:
What I have tried:
qlcmd = ( Stundetno = '101') and ( WIN TAG = 'A1' )
DataRow[] result = dt.Select(sqlcmd);
推荐答案
Spaces aren除非它们被封闭,否则不允许使用SQL名称。
试试这个:
Spaces aren't allowed in SQL names unless they are enclosed.
Try this:
sqlcmd = "( Stundetno = '101') and ( [WIN TAG] = 'A1' )";
这篇关于C#-syntax错误:'TAG'运算符后缺少操作数。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文