一段程序

moxing99 2003-05-08 03:52:54
cb_search clicked

sle_1.text=" "
sle_2.text=" "
sle_3.text=" "
sle_4.text=" "
sle_5.text=" "
sle_6.text=" "
sle_7.text=" "
em_1.text=" "
sle_9.text=" "
sle_10.text=" "

Transaction abc
abc.ServerName = 'abc'
abc.DBMS = 'ODB'
abc.Database = 'pubs'
abc.LogId = 'sa'
abc.AutoCommit=False
connect using abc;
if abc.sqlcode=0 then
open(w_main)
else
messagebox("数据库错误","无法成功远程服务器")
halt
end if

string ls_1,ls_2,ls_3,ls_4,ls_5,ls_6,ls_7,ls_8,ls_9,ls_10 //10个变量用来存放数据库
//查询出的结果
ls_10=sle_1.text
select name,sex,jg,zy,sg,tz,birthday,yx,bj from student //从数据库中找到指定的数据
into ls_1,ls_2,ls_3,ls_4,ls_5,ls_6,ls_7,ls_8,ls_9
where number=ls_10
sle_1.text=ls_1
sle_2.text=ls_2
sle_3.text=ls_3
sle_4.text=ls_4
sle_5.text=ls_5
sle_6.text=ls_6
em_1.text=ls_7
sle_1.text=ls_8
sle_1.text=ls_9
if sle_1.text=" "
then messagebox("错误","错误的学号,没有记录,请重新录入")
return
end if

在这段程序里面,(1)老是报在SQL语句的INTO那行有SYNTAX ERROR
(2)WHERE那行报ILLEGAL DATA TYPE :WHERE
(3)然后就是报我的IF 语句和结束语END IF也是语法错误!
请高手指点小弟几招
...全文
6 点赞 收藏 2
写回复
2 条回复
切换为时间正序
当前发帖距今超过3年,不再开放新的回复
发表回复
juwuyi 2003-05-08
select name,sex,jg,zy,sg,tz,birthday,yx,bj from student //从数据库中找到指定的数据
into :ls_1,:ls_2,:ls_3,:ls_4,:ls_5,:ls_6,:ls_7,:ls_8,:ls_9
where number=:ls_10;
sle_1.text=ls_1
sle_2.text=ls_2
sle_3.text=ls_3
sle_4.text=ls_4
sle_5.text=ls_5
sle_6.text=ls_6
em_1.text=ls_7
sle_1.text=ls_8
sle_1.text=ls_9
if sle_1.text=" " then
messagebox("错误","错误的学号,没有记录,请重新录入")
return
end if
回复
th820901 2003-05-08
select id into :ls_id
from bm
where xm = :as_xm;

if SQLCA.SQLCODE <> 0 then
Return
end if


//看看上面的吧 ,多看看书先..

回复
相关推荐
发帖
PowerBuilder
创建于2007-09-28

891

社区成员

PowerBuilder 相关问题讨论
申请成为版主
帖子事件
创建了帖子
2003-05-08 03:52
社区公告
暂无公告