我想知道怎么做:
params= new object[]{ new SqlParameter("ID",val),new SqlParameter("Label","'%Name%'")};
statement = "Select ID, Label from Country Where ID = ? or or Label Like ?";
我试过了,它给了我:
'?'附近的语法不正确。
答案 0 :(得分:2)
你有一个错字:
"Select ID, Label from Country Where ID = ? or or Label Like ?";
应该是
"Select ID, Label from Country Where ID = ? or Label Like ?";