代碼如下:但是怎么取不出資料?
Declare cur_zs Cursor For
SELECT KD,ZS,LL,PZB FROM VGTZS WHERE VGTXH = :as_xh and KD = 0 ORDER BY VGTXH,KD,ZS,PZB;
Open cur_zs;
Fetch cur_zs Into :ldc_kd,:ldc_zs,:ldc_ll,:ldc_pzb;
Do While SQLCA.SQLCODE = 0
If ldc_syzs = ldc_zs Then
ldc_x2 = 229 + (ldc_pzb - 1) * 3748 / 4
ldc_y2 = 1640 - (ldc_ll) * 10 * 300
tab_1.tabpage_3.dw_9.Modify('create line(band=detail x1="' + String(ldc_x1) + '" y1="' + String(ldc_y1) + '" x2="' + String(ldc_x2) + '" y2="' + String(ldc_y2) + &
'" pen.style="0" pen.width="5" pen.color="255" background.mode="2" background.color="255" )')
ldc_x1 = ldc_x2
ldc_y1 = ldc_y2
Else
If ldc_y1 > 0 Then
tab_1.tabpage_3.dw_9.Modify('Create text(band=detail alignment="0" text="' + String(ldc_syzs,"0") + '"border="0" color="255" x="' + String(ldc_x2) + &
'" y="' + String(ldc_y2) + '" height="40" width="200" font.face="黑體" font.height="-8" font.weight="400"' + &
' font.family="0" font.pitch="2" font.charset="134" background.mode="1")')
End If
ldc_x1 = 229 + (ldc_pzb - 1) * 3748 / 4
ldc_y1 = 1640 - (ldc_ll) * 10 * 300
ldc_syzs = ldc_zs
Fetch cur_zs0 Into :ldc_zs,:ldc_ll,:ldc_pzb;
end if
Loop
uj5u.com熱心網友回復:
建議先學習一下SQLCA.SQLCODE=-1
SQLCA.SQLCODE=100
SQLCA.SQLCODE=0
uj5u.com熱心網友回復:
是不是這句話那個條件陳述句中的欄位KD = 0不對?WHERE VGTXH = :as_xh and KD = 0
uj5u.com熱心網友回復:
先看看這個是不是有SQLCA.SQLCODE=-1,并彈出sqlca.sqlerrtext,這樣就是出錯資訊了如果沒有就有可能是無資料了
SQLCA.SQLCODE=100 //無記錄
uj5u.com熱心網友回復:
太高深,我看不懂標題。uj5u.com熱心網友回復:
其實為何不用資料視窗直接提取為0的?偏要用游標?uj5u.com熱心網友回復:
有點復雜 呵呵轉載請註明出處,本文鏈接:https://www.uj5u.com/shujuku/60698.html
標籤:基礎類
上一篇:PB與JAVA的壓縮通信
