请帮我看看哪出问题了??

yxr0118 2004-05-03 09:13:42
段1:select * from table_1 using sqlca;
if table_1.rowcount()>0 then
delete from table_1;
end if

段2:rowcount=dw_1.rowcount()
str_course cour[]//结构体数组
for i=1 to rowcount
G_RowNumber=i
cour[i].a=dw_1.GetItemString(G_RowNumber,"course_kcmc")
cour[i].b=dw_1.GetItemNumber(G_RowNumber,"teachtask_zks")
insert into table_2 values(:cour[i].a,:cour[i].b)using sqlca;
commit;
next
两段放在一起运行,就出问题,分开不出错
第两段insert、next所在行出错,显示“Syntax error”
请大虾帮忙看看!!
...全文
25 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
mittee 2004-05-04
  • 打赏
  • 举报
回复
insert into table_2 values(:cour[i].a,:cour[i].b)using sqlca;
这里错误明显,应该改为

insert into table_2(col_1,col_2) values(:cour[i].a,:cour[i].b)using sqlca;
yxr0118 2004-05-03
  • 打赏
  • 举报
回复
我主要想先看看table_1是不否是空表,不是刚删除其中的数据,然后把coun[]数组中的数据插入table_1中,
段2中的表是table_1,刚刚输入错误!

740

社区成员

发帖
与我相关
我的任务
社区描述
PowerBuilder 脚本语言
社区管理员
  • 脚本语言社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧