Tuesday, December 30, 2008

Declare Cursor

sql_perintah="select th"+ string(ii_tahun) +"from gaji_pokok where kd_golongan= ?"

DECLARE my_cursor DYNAMIC CURSOR FOR SQLSA;

PREPARE SQLSA FROM :sql_perintah;
OPEN DINAMIC my_cursor using :kd_golongan;
FETCH my_cursor INTO :id_tahun;

If sqlca.sqlcode = 100 then
messagebox('Informasi','data tidak ada')
End if

CLOSE my_cursor;

No comments: