comp.lang.ada
 help / color / mirror / Atom feed
From: "Robert I. Eachus" <rieachus@comcast.net>
Subject: Re: GNADE insert problem
Date: Sat, 20 Dec 2003 13:35:53 -0500
Date: 2003-12-20T13:35:53-05:00	[thread overview]
Message-ID: <OPKdnWEu7rUWC3miRVn-tA@comcast.com> (raw)
In-Reply-To: <MPG.1a4e39297fd4edd69897a3@News.CIS.DFN.DE>

Jano wrote:

> I've workaround it disconnecting from the DB after each insert. Since I 
> insert a record per minute and the db is local, it can hold that way 
> until I get into the package you have suggested.

As an aside, this problem is why I quickly get headaches mixing Ada and 
SQL.  SQL has this concept of an implicit cursor, and you have to be 
very careful that every Ada thread containing SQL maintains its own 
cursor correctly.

How you do that depends on the database, the interface language (i.e. 
whether it is compiled or embedded SQL) and what you are doing.  But 
when you have to think in SQL while working in Ada, it is very painful.

Having an explicit cusor parameter for each SQL call is neither Ada or 
pure SQL.  But when possible, it eliminates a lot of headaches.

-- 
                                           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-20 18:35 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 [this message]
2003-12-21  9:41       ` Jano
2003-12-21 10:37         ` Jano
2003-12-21 20:32           ` Robert I. Eachus
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