comp.lang.ada
 help / color / mirror / Atom feed
From: "Robert I. Eachus" <rieachus@comcast.net>
Subject: Re: GNADE insert problem
Date: Sun, 21 Dec 2003 15:32:41 -0500
Date: 2003-12-21T15:32:41-05:00	[thread overview]
Message-ID: <J5GdnR0BN_v2nnuiRVn-jA@comcast.com> (raw)
In-Reply-To: <MPG.1a4f9663f0f0e7859897a5@News.CIS.DFN.DE>

Jano wrote:

> Just for the record, connecting from the same tasks makes no difference.

I meant it when I said thread I meant execution thread, not thread of 
control.  Maybe I should have spelled it out.  Threads of control are 
usually mapped to different tasks in Ada, but there can be execution 
threads in a program that are NOT visible as tasks or otherwise. 
Typically you will create an execution thread in a database when you log 
in, and close it by logging out.  But for example when you type SQL in a 
terminal session, each query is a separate execution thread.

What makes cursor control so painful is that to find where where a 
cursor is created or set you have to look below the user visible Ada and 
SQL levels.  Once you know which actions create cursors, you then have 
to find out where cursors are used and where the cursor that is used is 
expected to be found.

The error message you are getting could come either from a thread that 
does not create a thread but expects an implicit cursor to be passed to 
it, or it could be that another action in that thread is leaving the 
implicit cursor locked.  Without the software in front of me, I can't 
tell you what is happening, just to read the documentation--assuming you 
have decent documentation--or the source code and mark all the places 
where cursors are created, set, locked, and PASSED to other 
programs/subprograms/threads.

When you have an Ada program that can have several active execution 
threads--and cursors in the database, you will still often have only one 
or two Ada tasks.  (I typically have one task interacting with a user at 
a keyboard and display, and one task spawning queries, although 
sometimes I will have additional tasks for doing formatting of data 
returned.  But the mapping I use is cusor <---> query, not cusor <---> 
Ada task.
-- 
                                           Robert I. Eachus

"The war on terror is a different kind of war, waged capture by capture, 
cell by cell, and victory by victory. Our security is assured by our 
perseverance and by our sure belief in the success of liberty." -- 
George W. Bush




  reply	other threads:[~2003-12-21 20:32 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-12-19 16:40 GNADE insert problem Jano
2003-12-20  1:55 ` Stephen Leake
2003-12-20  9:47   ` Jano
2003-12-20 18:35     ` Robert I. Eachus
2003-12-21  9:41       ` Jano
2003-12-21 10:37         ` Jano
2003-12-21 20:32           ` Robert I. Eachus [this message]
2003-12-31 12:12         ` Michael Erdmann
2003-12-31 15:42           ` Robert I. Eachus
2004-01-01  9:17             ` Michael Erdmann
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox