Translating with DrWatson… this can take a few seconds the first time.
This is a genuine, complex translation. DrWatson protects commands, error codes, and log output while naturally translating the surrounding text. It’s translated once and saved.
Art S. Kagel — — source: Informix-list mailing list archive (1991-1998)
Jacob Salomon wrote:
>
> Hi Family.
>
> I am practicing the use of dynamic SQL with SQL descriptors and have run
> into a strange behavior.
>
> After preparing the INSERT statement and declaring a cursor for it
> (DESCRIBE is in there someplace but not relevant to this problem) I
> issue the open statement:
> exec sql open :sq_cursorid; /* Name of cursor is in char[] */
>
> I got error -255/0 on this open statement.
> $ finderr 255> -255 Not in transaction.
[SNIP]
> This is with ESQL release 7.11.UC1 on an HP-UX 10.01 system.
>
> The database is "unbuffered" logging.
>
> Can anyone make sense of this situation? While it is certainly a good
> idea to do my stuff in a transaction, I should not be forced to do so,
> considering that the engine will insert BEGIN and COMMIT around [the log
> entry for] each inserted row.
No Jake. The engine WILL treat a singleton INSERT statement as a self
contained transaction but an INSERT CURSOR, by definition, is not a
singleton INSERT statement since it can insert mulitple rows in a
single buffer flush. That is why a transaction is REQUIRED to use an
INSERT CURSOR in a database with logging.
Art S. Kagel
We use strictly necessary cookies to make this site work. With your
consent we’d also use optional cookies for analytics and marketing. You can accept all,
reject all, or choose. Read our Cookie Policy.