hi!!
I am programming a application system with sybase sqlserver and pb5.0,here
is the vertion:
SQL Server/11.0.2.1/P/PC Intel/Windows NT 3.5/EBF 6722/OPT/Thu Oct 24 1996
19:59:07.06
PB5.0.02,dbms=SYC SYBASE OPEN CLIENT 10.0.3
Now I found a problem in my script,when I read the data from #prt_detail,
the data was not updated,and there is no problem reported in sqlca.
The problem is not always appearence.

pleas help to show where is wrong in my script or any bug in my sql server
or pb system!!!

**my script,is was called by another cursor loop.
sqlca.autocommit=true
SQLCA.dbParm = "CursorUpdate = 1"
DECLARE prtdetail_cursor CURSOR FOR
SELECT wh,mqxqs,fh,qj,fh1,ytls,zhj FROM #prt_detail
where wh=:awh and cc1=:acc1 and cc2=:acc2 order by cnjhrq,zl;

OPEN prtdetail_cursor;
FETCH prtdetail_cursor INTO :wh,:mqxqs,:fh,:qj,:fh1,:ytls,:zhj;
if sqlca.sqlcode= -1 then wf_systemerror_reg("wf_recalc_detailqj()",19)

wqj=akcs
DO WHILE SQLCA.sqlcode=0
if fh1='@' then
fh='+'
absqj=0
else
wqj=wqj - mqxqs + ytls
if wqj>0 then
fh='+'
else
fh='-'
end if
// absqj=abs(wqj)
absqj=wqj
end if
UPDATE #prt_detail SET fh=:fh,qj=:absqj,zhj=:zhj
WHERE CURRENT of prtdetail_cursor ;

if sqlca.sqlcode<>0 then wf_systemerror_reg("wf_recalc_detailqj()",32)

FETCH prtdetail_cursor INTO :wh,:mqxqs,:fh,:qj,:fh1,:ytls,:zhj;
zhj=space(15)
LOOP

if sqlca.sqlcode= -1 then wf_systemerror_reg("wf_recalc_detailqj()",34)
CLOSE prtdetail_cursor;

SQLCA.dbParm = "CursorUpdate = 0"