比较着急、棘手的问题,求各位大虾们看看!
我用C#开发的程序,在iis中承载.Net远程对象,在对数据库检索时发生下面的问题:
使用的查询语句不变,输入的参数不变的情况下,查询的结果不同,请问是什么原因?
数据库是oracle8i,iis是5.0,.netFramework是2.0
我的查询语句:
SELECT VNO, LOADPLANNO, WERKS, ORDERTYPE, OTPTEXT, VBELN, MTART, MTBEZ,
MATKL, WGBEZ, LGORT, LGOBE, FCJS, FCMNG, JLMNG, CKDATE, CH, CKNAM,
CKHZSTATUS, KUNNR, NAME1, YSSTATUS, PDDATE, BANZU, HZCLSTATUS,
PZHJHH, CHX, CHZH, RAILROAD, STATION, LEASEDLINE, STATUS, BZH, HWMC,
HWDW, HWZL, BJYS, BIAOZH, HYNAME, HYDATE, CCDATE, JCDATE, FCNAME,
FCDATE, PZSTATUS, LTVNO, YFSTATUS, YFNAME, YFDATE, YFKD, YFBKD, YFBXF,
LIFNR, MCOD1, UPLOADDATE, UPLOADNAM, UPLOADSTATUS, BZMNG, BSTNK,
TRUSTBILLNUM, TBSTATUS, JLWTDATE, OLDLGORT, OLDLGOBE, JHSTATUS, JHSL,
KUNWE, NAME2, LRDATE
FROM XBCCGL.EXPORTHEADER
WHERE (JCDATE between :T1 and :T2) and ((YSSTATUS = '0' and STATUS = '3') or (YSSTATUS <> '0' and STATUS = '1'))
and ((VBELN like :VBELN) or (:VBELN1 is null))
and ((CH like :CH) or (:CH1 is null))
and ((PZHJHH like :PZHJHH) or (:PZHJHH1 is null))
and ((RAILROAD like :RAILROAD) or (:RAILROAD1 is null))
and ((STATION like :STATION) or (:STATION1 is null))
and ((LGORT like :LGORT) or (:LGORT1 is null))
and ((LGOBE like :LGOBE) or (:LGOBE1 is null))
and ((KUNNR like :KUNNR) or (:KUNNR1 is null))
and ((NAME1 like :NAME1) or (:NAME11 is null))
and ((KUNWE like :KUNWE) or (:KUNWE1 is null))
and ((NAME2 like :NAME2) or (:NAME21 is null))
and ((BSTNK like :BSTNK) or (:BSTNK1 is null))
and ((CHX like :CHX) or (:CHX1 is null))
and ((HWMC like :HWMC) or (:HWMC1 is null))
and (YSSTATUS in (:YSSTATUS1, :YSSTATUS2, :YSSTATUS3))
输入的参数值:
t1:2006-5-11 18:00:00
t2:2006-5-12 17:59:59
YSSTATUS1:‘0’
YSSTATUS2:‘1’
YSSTATUS3:‘2’
其他参数全部为""
大多数情况下,查询结果为191条记录(这是正确值),但连续查询几次会出现查询结果为134、36、11、...条记录
把远程对象从iis移到本地客户端时,这种现象没有发现,请问这是什么原因,怎么解决?
在此先谢过各位!
为什么查询结果不同?