编译出错,显示C0031: syntax error
string ccname,ccno
c_info = upper(sle_1.text)
if c_info= "" then
MessageBox("出错", "请输入课程号!")
else
select c.cname into :ccname from c where c.cno =: c_info
if SQLCA.SQLCODE<> 0 then
MessageBox("出错", "此课程号不存在!")
else
select sc.cno into ccno from sc where (sc.cno=:c_info and
sc.sno=:s_info);
if SQLCA.SQLCODE = 0 then
MessageBox("出错", "此课程已存在!")
else
INSERT INTO sc(sno,cno)
VALUES (:s_info, :c_info);
dw_4.reset()
sle_1.text=" "
dw_4.settransobject(sqlca)
dw_4.retrieve(s_info)
end if
end if
end if
------解决方案--------------------
select c.cname into :ccname from c where c.cno =: c_info
这句话没有结束 分号 ';'
------解决方案--------------------
select c.cname into :ccname from c where c.cno =: c_info 少了分号
------解决方案--------------------
PB脚本内嵌SQL语句需要加分号
select c.cname into :ccname from c where c.cno =: c_info ;