Page 1 of 1

The Cursor is Already Open

Posted: Thu 04 Oct 2007 21:29
by zedmartins
Hello all,

I'm receiving this error after calling the Execute method of a TMSStoredProc component inside a COM+ ActiveX DLL.

Debugging the SDAC source I found the error inside a GetNextResult method.

It is a simple StoredProc... It only returns the result of a simple calculation using an OUT parameter... Why this MultipleResults thing? Why this GetNextResult is called?

Maybe it is related to COM+ threading model issues... Any help?

If I call the same stored procedure inside an .exe the error doesn't appear.

I'm using D5(upd) e SDAC 4.10.0.10...

Thanks a lot,

Posted: Mon 08 Oct 2007 08:22
by Antaeus
It is looks like one TMSConnection or TMSStoredProc object is used in different threads. You should create a separate components for the each thread.

If you often connect/disconnect to the server from different threads, you should enable pooling in your TMSConnections. For more information about pooling you can read in the SDAC help.