HOW TO TRAP "No SQL Cursors remaining"

forum.centura.team.developer (2000-2005) & forum.sqlwindows (2000-2005)
User avatar
Charlie
Canada
Posts: 270
Joined: 07 Mar 2017, 18:52
Location: Fredericton, New Brunswick, Canada

HOW TO TRAP "No SQL Cursors remaining"

Post by Charlie » 28 Jan 2005, 14:50

 Posted by:  Jason Veniot 

G'day folks,

I've attached a snapshot of the error message and a simple app to generate
it. If I set max cursors to 99, no problem. If I set at 100 or more, I get
the error message.

After finding other posts in this newsgroup that confirm that there is some
hard-coded limit of 99 Sql Connections (per app?), I still have a few
questions:

- do newer versions of Team Developer (we're using TD 2.1) increase that
hard-coded limit?
- is there a way to trap that sql error message to provide more graceful
processing?

Thanks in advance.

Attachment: files.zip

Joost van Iersel

HOW TO TRAP "No SQL Cursors remaining"

Post by Joost van Iersel » 28 Jan 2005, 16:05

 Posted by:  Joost van Iersel 

Maybe for SqlBase it is hardcoded.
But as far as I know for oracle it is a parameter on the server.
I do not know which one because if it is necessary or DB-administrator
changes the parameter for me.

But in our case it mostly is an programming error when this message occurs.

Joost van Iersel
DBS Business Solutions BV
Amersfoort The Netherlands

Jim McNamara

HOW TO TRAP "No SQL Cursors remaining"

Post by Jim McNamara » 28 Jan 2005, 16:33

 Posted by:  Jim McNamara 

I can't fathom why you'd need more than a handful of cursors at any given
time.

To answer your question, if the error is from SQLBase there should be an
error # that you can trap On SAM_SqlError.

If it's an application level error (like division by 0), I think ITG has a
method to trap those.

Martin Knopp

HOW TO TRAP "No SQL Cursors remaining"

Post by Martin Knopp » 28 Jan 2005, 18:06

 Posted by:  Martin Knopp 

If I recall right the limit had been increased (I think to 254) in either
TD3.0 or TD3.1

--
Martin Knopp, Dipl. Ing.

fecher GmbH
good people - good software

D'Orsay-Gasse 4/1
A-1090 Wien

Phone +43-1-3199124-0
Fax: +43-1-3199124-80
mailto:Martin.Knopp@fecher.at
http://www.fecher.at
------------------------------------------

We would be happy to inform you regarding the following topics

-- Cross platform development with SQLBase and Team Developer for Windows
and Linux

-- buildingBLOCKS XP: Web User Interfaces with ASP.NET and Team Developer

-- classCOMPILER.NET: Compiling non-visual SAL code to MSIL (.NET) more at
http://www.fecher.at/classcompiler

-- buildingBLOCKS JAVA: Rapid Development of open browserbased
Business Applications

User avatar
Charlie
Canada
Posts: 270
Joined: 07 Mar 2017, 18:52
Location: Fredericton, New Brunswick, Canada

HOW TO TRAP "No SQL Cursors remaining"

Post by Charlie » 28 Jan 2005, 19:15

 Posted by:  Jason Veniot 

Actually, I would never want that many cursors at any time. We have an app
that was not cleaning up connections well. We figured out the problem, but
were hoping that we could code some error trapping in case this ever happens
again.

Neither SAM_SqlError nor When SqlError can trap that error. (See modified
attachment)

Attachment: test sql cursor count.app

Karthik

HOW TO TRAP "No SQL Cursors remaining"

Post by Karthik » 28 Jan 2005, 20:34

 Posted by:  Karthik 

You cant. Christian Schubert had posted a "Box Eater" that can trap such
errors. Check in the ITG web pages for that.

Alternatively, port to OLE DB and see what happens.

Regards
Karthik

Return to “forum.sqlwindows”

Who is online

Users browsing this forum: [Ccbot] and 0 guests