请帮我看看是哪里错了?谢谢谢谢(pb)

来源:百度知道 编辑:UC知道 时间:2024/06/10 20:58:34
string sn,c
select cno into :c from Shouke where tno=:sle_5.text;
select sno into :sn from Xuanke where cno=:c;

string s="select sno,ssex,sname,sage,dno from Student where sno=:sn"
dw_1.setsqlselect(s)
dw_1.retrieve()
因为c是主语言变量,却在sql server语句中···

select cno into :c from Shouke where tno=:sle_5.text;

c前面为什么有冒号

那要用字符串拼接 且值前后要有单引号

不太了解pb 不知道用什么语法拼接

string s="select sno,ssex,sname,sage,dno from Student where sno='"+:sn+"'"