754
社区成员




datastore lds
string ls_sql, ls_syntax, ls_temp, ls_colValue1,ls_colValue2,ls_colValue3, ls_colValue4,ls_colValue5,ls_colValue6,ls_select,ls_mleText,num,num1[],str
long ll_rown
long i
lds=create datastore
ls_sql="SELECT * FROM citybusdatalist "
ls_syntax=SQLCA.SyntaxFromSql(ls_sql,"",ls_temp)
if len(ls_temp)>0 then
MessageBox("error","SyntaxFromSQL caused these errors:" + ls_temp)
return
end if
lds.Create(ls_syntax ,ls_temp)
lds.SetTransObject(sqlca)
lds.retrieve()
ll_rown= 1
ls_colValue1=string(lds.GetItemnumber(ll_rown,'uid'))
ls_colValue2=lds.GetItemString(ll_rown,'tablename')
ls_colValue3=lds.GetItemstring(ll_rown,'mflag')
ls_colValue4=string(lds.GetItemdatetime(ll_rown,'mdate'))
ls_colValue5=lds.GetItemstring(ll_rown,'idstr')
ls_colValue6=lds.GetItemstring(ll_rown,'id')
if ls_colValue2 = '从业人员' then //从业人员检索
if ls_colValue3 = 'd' then
ls_mleText=ls_mleText+'&'+'司机删除' + ','
else
select name into :num from dt_career where id = :ls_colValue1;
// DECLARE C1 CURSOR FOR //定义C1游标
// select name,gender from dt_career where id = :ls_colValue1; //取值
// OPEN C1; //打开游标
// DO WHILE sqlca.SQLCODE=0
// FETCH C1 INTO:num,:str; //将游标内的数据一条条存放到自定义变量里
// LOOP
// CLOSE C1;
ls_mleText=ls_mleText+'&'+'司机修改' +','+ls_colValue5+',' +num+','+str+','+ls_colValue4
end if
end if
if ls_colValue2 = '车辆' then //车辆检索
if ls_colValue3 = 'd' then
select color into :ls_select from lt_vehicle where id = :ls_colValue1;
ls_mleText=ls_mleText+'&'+'车辆删除' +',' + ls_select
else
select color into :ls_select from lt_vehicle where id = :ls_colValue1;
ls_mleText=ls_mleText+'&'+'车辆修改' +',' + ls_select
end if
end if
if ls_colValue2 = '企业' then //企业检索
if ls_colValue3 = 'd' then
select proprietorName into :ls_select from lt_proprietorbase where id = :ls_colValue1;
ls_mleText=ls_mleText+'&'+'单位删除' +',' + ls_select
else
select proprietorName into :ls_select from lt_proprietorbase where id = :ls_colValue1;
ls_mleText=ls_mleText+'&'+'单位修改' +',' + ls_select
end if
end if
destroy lds
mle_1.text=ls_mleText
我的代码是这样的,帮忙看一下,取出是所有的值,差的是一条一条的取出,和点击发送后出现下一条