I had the following problem:
I get in a centura application which is connected to oracle the error
message
"sql error : no sql curors remaining. Halt application yes no?"
When I restart the program it works fine. What is the reason for this error?
Can it be a bad network connection ?
Marcel
--
************************************************************
* PC-Soft GmbH * Tel: +49-(0)3573-7075-26 *
* Marcel Lehmann * Fax: +49-(0)3573-7075-19 *
* Softwareentwicklung * Mobil: +49-(0)172/8491395 *
* A.-Hennecke-Str. 37 * e-Mail: mleh...@pcsoft.de *
* 01968 Senftenberg * Internet: http://www.pcsoft.de *
************************************************************
could it be your application is wasting sql cursors by overwriting variables
containing connected cursors (i.e. calling SqlConnect with an Sql Handle
which is alrady connected) ? You should pay attention not to do this,
especially loops will rather quick lead to the error you described.
HTH
Christian Schubert
"Marcel Lehmann" <mleh...@pcsoft.de> schrieb im Newsbeitrag
news:8k402r$q4...@horizon.centurasoft.com...
regards,
Marc Staudacher
"Marcel Lehmann" <mleh...@pcsoft.de> wrote in message
in the v_$open_cursors are only 10 cursors for the session.
Marcel
--
************************************************************
* PC-Soft GmbH * Tel: +49-(0)3573-7075-26 *
* Marcel Lehmann * Fax: +49-(0)3573-7075-19 *
* Softwareentwicklung * Mobil: +49-(0)172/8491395 *
* A.-Hennecke-Str. 37 * e-Mail: mleh...@pcsoft.de *
* 01968 Senftenberg * Internet: http://www.pcsoft.de *
************************************************************
Marc Staudacher <marc.st...@finesolutions.ch> schrieb in im
Newsbeitrag: 39530CC2@s004...
I don't do this, but I do often the following:
Set bConnect = SqlConnect(hSql)
If bConnect
! Do the sql work
Call SqlDisconnect(hSql)
I do this very often to check the status of a field or something similar.
i.e. In a table window the user can write the number of a customer.
If the focus leave the column, I check if the costumer-nr is valid.
I do this in the way described.
Can that be the reason for the error?
Marcel
doing this is not a problem which will waste cursors but if you
connect/disconnect a handle every time the user leaves a field it will be a
waste of time ;-) Connect/ disconnect takes some time especially when you
connect the first cursor to Oracle. Normally it's no problem to connect a
handle on SAM_Create of a window / dialog and disconnect it on SAM_Destroy
and use it in between for several tasks. I've been doing this for years and
never ran into problems with the number of open cursors (except when I was
wasting them as described above).
To make sure you are not wasting any cursors you might want to write your
own function for Disconnect which sets the cursor variable to hWndNull (yes
that's right!) after disconnecting. Then write a function to connect cursors
which checks the cursor variable for anything != hWndNULL and displays a
message if not. You will soon see where's your problem.
HTH
Christian Schubert
"Marcel Lehmann" <mleh...@pcsoft.de> schrieb im Newsbeitrag
news:8k4g2n$qq...@horizon.centurasoft.com...
I'll try it.
Marcel
--
************************************************************
* PC-Soft GmbH * Tel: +49-(0)3573-7075-26 *
* Marcel Lehmann * Fax: +49-(0)3573-7075-19 *
* Softwareentwicklung * Mobil: +49-(0)172/8491395 *
* A.-Hennecke-Str. 37 * e-Mail: mleh...@pcsoft.de *
* 01968 Senftenberg * Internet: http://www.pcsoft.de *
************************************************************
Christian Schubert <schu...@godesys.de> schrieb in im Newsbeitrag:
8k4gii$qr...@horizon.centurasoft.com...
I tried it but no result.
I forgot to say that this problem only appears by one costumer. All other
costumer work normal with our program.
Know you another reason, which could responsable for this behaviour?
Thanks so far,
hth,
raghavan
"Marcel Lehmann" <mleh...@pcsoft.de> wrote in message
news:8k4llc$qq...@horizon.centurasoft.com...
"Marcel Lehmann" <mleh...@pcsoft.de> wrote in message
news:8k402r$q4...@horizon.centurasoft.com...
> Hi,
>
> I had the following problem:
>
> I get in a centura application which is connected to oracle the error
> message
> "sql error : no sql curors remaining. Halt application yes no?"
>
> When I restart the program it works fine. What is the reason for this
error?
> Can it be a bad network connection ?
>
we've solved the problem.
A little bug in the programm.
There were two sql handles opened with SqlConnect and closed with SqlClose.
There's the error SqlOpen/SqlClose and SqlConnect/SqlDisconnect are working
together.
Thanks for your advices.
Marcel