662
社区成员
发帖
与我相关
我的任务
分享
datastore ds1
string as_syntax,dwsyntax_str
long ll_row,ll_returnrow
string ls_returnmodiy
string ls_error
string csa
int i,LI_WHERE
uf_connect();
if SQLCA.SQLCode <> 0 then
as_returnerr="连接数据库出错,请检查数据库连接参数。"+string(sqlca.sqlerrtext)
return -1////创建数据窗口出错
end if
as_syntax = "select a.ybbm,a.pm,a.zczh,a.ggxh,a.jjdw,a.xxsxrq from sta000.yb_ylqc a where a.imonth = (select max(a.imonth) from sta000.yb_zlxm a) and a.xxsxrq<=to_char(sysdate + 60 ,'YYYYMMDD')" +&
"union all " + &
"select b.ybbm,b.xmmc,b.fylb,'',b.jjdw,b.xxsxrq from sta000.yb_zlxm b where b.imonth = (select max(b.imonth) from sta000.yb_zlxm b) and b.xxsxrq<=to_char(sysdate + 60 ,'YYYYMMDD')" +&
"union all " + &
"select e.tbdm,e.yptym,e.ggbzwzbs,e.scqy,e.bzdw,e.yxrq from sta000.yk_ypjcxx e where e.yxrq<=to_char(sysdate + 60 ,'YYYYMMDD')" +&
"and e.yxrq >= to_char(sysdate - 3 ,'YYYYMMDD')"
dwsyntax_str = Sqlca.syntaxfromsql(as_syntax, "style(type=grid)",ls_error)
IF Len(ls_error) > 0 THEN
uf_disconnect()
as_returnerr="SyntaxFromSQL caused these errors! "+ls_error
RETURN -1
END IF
ds1.Create( dwsyntax_str, ls_error)
IF Len(ls_error) > 0 THEN
uf_disconnect()
as_returnerr = "Create cause these errors: "+ ls_error
RETURN -1////创建数据窗口出错
END IF
int li_a
li_a=ds1.settransobject(sqlca)
if li_a<>1 then
uf_disconnect()
as_returnerr="服务端设置数据存储事务出错!"
return -1///设置对像事物出错
end if
ll_row=ds1.retrieve()
if ll_row<0 or isnull(ll_row) then
ls_error = sqlca.sqlerrtext
uf_disconnect()
as_returnerr="数据检索出错!" + ls_error
return -1//服务端检索数据出错
end if
ll_returnrow=ds1.getfullstate(dwo_blob)
if ll_returnrow<0 or isnull(ll_returnrow) then
uf_disconnect()
as_returnerr="服务端进行blob时,获取数据行出错!"
return -1 //封装到blob变量时出错
end if
uf_disconnect()
destroy ds1;
as_returnerr="数据检索成功!"
return ll_returnrow
blob lb_datastore
string ls_err
soapconnection conn1
n_webservice n_p_ws_test_wsproxy1
conn1 = create soapconnection
conn1.createinstance( n_p_ws_test_wsproxy1,"n_webservice")
try
n_p_ws_test_wsproxy1.uf_retrieve(lb_datastore, ls_err)
catch(soapexception e1) //soapexception定义的异常
messagebox("sop异常",e1.text)
catch (runtimeerror re1) //
Messagebox("web连接错误",re1.text)
end try
if len(ls_err)>0 then
messagebox('',ls_err)
return
end if