Cursor.Recordcount

Bart Pietercil bart.pietercil at cognosis.be
Mon Feb 2 04:25:34 CST 2009


Hi Ruslan, list,

do we have in valentina sql something like cursor.recordcount ?

In a stored procedure i have this :

this is part of the procedure (somewhere in the middle)
----------------------
declare cells_cur1 cursor for select tbl_cells.recid, core_syncid from  
tbl_cells where core_syncid in (select distinct member_group_id from  
advita_import);
declare cellRecID,cellcore_sync llong;
open cells_cur1;
fetch first cells_cur1 into cellRecID,cellcore_sync;
loop
	BEGIN
		update advita_import set cell_recid = cellRecID where  
member_group_id = cellcore_sync;
		fetch next cells_cur1 into cellRecID,cellcore_sync;
	exception
	when 56503 then
		leave
	end
end loop
close cells_cur1;
-----------------
when I run this proc I get an error

  10:30:21 Kernel error: 0x56503. Cursor "cells_cur1" failed to do  
"FirstRecord".


Now I understand why this happens but do I really have to build  
another cursor counting the  records before trying to do 'firstrecord' ?
There seems to be no equivalent of curs.recordcount in sql ?

tia

Bart

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macserve.net/pipermail/valentina/attachments/20090202/c451dfb8/attachment-0001.html 


More information about the Valentina mailing list