Subject Declare Cursor Already Exists??? HELP!!!
Author Kelly Salvage
Hi there

I have been workin with interbase for a couple of years now, and have
never had any problems that I could not solve, until now...
I have an application that needs to dynamically load dlls, and pass a
TIBdatabase component to a form created by the dll. So far, so good.
I can open a query on the fomr returned by the dll, but this is not
allways successfull. Sometimes I get the following error:

"Dynamic SQL Error
SQL error = -502
Declared Cursor Allready Exists"

If I move the Database fomonete from the data module to the main
form, and pass it to the form created by the dll, it then works.
However, if I add another table to the dlls form, I get this error
again.

I have lloked in the source code of interbase (dsql.c) where cursor
names are declared and this error is raised if the cursor allready
exists. Great: but I do not know how to explicitly name a cursor for
a tIBtable or a TIBQuery, so this does not help.

Is there something about dlls that I should know? Or does the problem
lie in the way the IBX controls declare cursors, or (heaven forbid)
does this problem lie in the gds32 dll?

Is there a way I can declare a cursor name for a TIBTable or TDataset?
Otherwise, is this a dll issue that can be resolved (I am a newbie
when it comes to creating and using dlls).

Thanks
Kelly