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.
Jacob Salomon — — source: Informix-list mailing list archive (1991-1998)
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.
I don't recall any requirement that an insert cursor can be opened only
in a transaction.
BTW, when I put BEGIN/COMMIT work statements around that section of
code it executed correctly.
exec sql BEGIN WORK;
exec sql open :sq_cursorid;
exec sql put :sqcusorid using sql descriptor :sq_descriptor;
exec sql flush :sq_cursorid
exec sql commit work;
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.
--
-- Jake (Retrospectively realizes there is no future in hindsight)
+------------------------------------------------------------+
| The expedient performance of a task with excessive concern |
| regarding its duration-to-completion engenders a virtual |
| certainty of diminished benefit therefrom. |
| -- Benjamin Franklin (but he said it in 3 words) |
+------------------------------------------------------------+
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.