Feedback on procedure
Thorsten Hohage
thohage at genericobjects.de
Sun Sep 14 17:34:43 CDT 2008
Hi Bart,
while I'm obviously to tired to get deep in your logic, I asked, why
you're using a cursor for a "single" operation?
On 2008-09-14, at 23:28, Bart Pietercil wrote:
> declare myCounter integer;
> declare ListID integer;
> declare cur2 cursor For Select count(recid) from tbl_typelists where
> objptr_organisation = OrganisationID and typelistname
> ='usergroups';
>
> OPEN cur2;
> fetch first cur2 into myCounter;
> close cur2;
a simple
set myCounter = Select count(recid) from tbl_typelists where
objptr_organisation = OrganisationID and typelistname ='usergroups';
should do it here. Of course I'm not sure, if this is noticeable
faster, but it's obviously less code so less errors can be made.
And as far as I can see, you never close cur3 - this might be ok, if
SP terminated correctly but can cause issues with cursor alread open
cur3 if not.
If you want to get more details / opinions I need a coffe tomorrow
morning first ;-)
regards,
Thorsten Hohage
--
Valentina Technology Evangelist
generic objects GmbH - Leiter Solution Center Nord
More information about the Valentina
mailing list