PB编程系统报错:“error:C0031 sysntax error”求解!! 我照着书上给的代码原样输入的,怎么会报错啊? 5
以下是所输代码:longll_idstringls_name,ls_studentreset(ddlb_student)//定义游标declarestudentcurso...
以下是所输代码:
long ll_id
string ls_name,ls_student
reset(ddlb_student)
//定义游标
declare studentcursor cursor for
select "student"."stu_id","student"."name"
from "student" ;
//打开游标
open studentcursor ;
//使用游标
if sqlca.sqlcode=-1 then
messagebox("sql 错误",string(sqlca.sqlcode)+":"+sqlca.sqlerrtext)
else
ls_name=""
do
if ls_name<>"" then
ls_student=" ("+string (ll_id) +") " +ls_name
ddlb_student.additem(ls_student)
end if
fetch studentcursor into :ll_id,:ls_name;
loop while sqlca.sqlcode=0
if sqlca.sqlcode=-1 then
messagebox("sql 错误",string(sqlca.sqlcode)+":"+sqlca.sqlerrtext)
end if
//关闭游标
close studentcursor; 展开
long ll_id
string ls_name,ls_student
reset(ddlb_student)
//定义游标
declare studentcursor cursor for
select "student"."stu_id","student"."name"
from "student" ;
//打开游标
open studentcursor ;
//使用游标
if sqlca.sqlcode=-1 then
messagebox("sql 错误",string(sqlca.sqlcode)+":"+sqlca.sqlerrtext)
else
ls_name=""
do
if ls_name<>"" then
ls_student=" ("+string (ll_id) +") " +ls_name
ddlb_student.additem(ls_student)
end if
fetch studentcursor into :ll_id,:ls_name;
loop while sqlca.sqlcode=0
if sqlca.sqlcode=-1 then
messagebox("sql 错误",string(sqlca.sqlcode)+":"+sqlca.sqlerrtext)
end if
//关闭游标
close studentcursor; 展开
2个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询