Embedded SQL question

Started by Michael Meskesalmost 27 years ago3 messages
#1Michael Meskes
Michael_Meskes@topmail.de

On my todo list I found two missing commands:

exec sql free
exec sql alloc

I remember seeing them in an (Informix?) example. But I cannot remember what
they should do? They do not seem to be standard either.

Does anyone one know more about this?

Also there is the exec sql type statement. At least Oracle has this typedef
equivalent. The syntax is:

exec sql type <c-type> is <ora-type>

In my examples this is followed by the keyword "REFERENCE". I have no idea
whether this is required or optional. Does anyone know that? And what does
it mean?

Michael
--
Michael Meskes | Go SF 49ers!
Th.-Heuss-Str. 61, D-41812 Erkelenz | Go Rhein Fire!
Tel.: (+49) 2431/72651 | Use Debian GNU/Linux!
Email: Michael.Meskes@gmx.net | Use PostgreSQL!

#2Zeugswetter Andreas IZ5
Andreas.Zeugswetter@telecom.at
In reply to: Michael Meskes (#1)
AW: [HACKERS] Embedded SQL question

On my todo list I found two missing commands:

exec sql free

free is the opposite to prepare, a statement stays prepared until free is
called.
This will release all associated resources. In my Informix manual it sais,
that
it will not affect an already declared cursor on this statement.

exec sql prepare d_id from :stmt;
....
exec sql free d_id;

exec sql alloc

All I find for this is:
exec sql allocate descriptor :descname [with max :colmax];
allocates memory for a system descriptor area (sqlca) for a maximum of
colmax columns (default 100) for use with a describe statement.

Andreas

#3Michael Meskes
Michael_Meskes@topmail.de
In reply to: Zeugswetter Andreas IZ5 (#2)
Re: [HACKERS] Embedded SQL question

On Tue, Feb 09, 1999 at 10:14:26AM +0100, Zeugswetter Andreas IZ5 wrote:

free is the opposite to prepare, a statement stays prepared until free is
called.
This will release all associated resources. In my Informix manual it sais,
that
it will not affect an already declared cursor on this statement.

exec sql prepare d_id from :stmt;
....
exec sql free d_id;

Oh, that's easy. :-) I already have it with the standard syntax 'exec sql
deallocate prepare'.

exec sql alloc

All I find for this is:
exec sql allocate descriptor :descname [with max :colmax];
allocates memory for a system descriptor area (sqlca) for a maximum of
colmax columns (default 100) for use with a describe statement.

Guess this has to wait some more.

Michael
--
Michael Meskes | Go SF 49ers!
Th.-Heuss-Str. 61, D-41812 Erkelenz | Go Rhein Fire!
Tel.: (+49) 2431/72651 | Use Debian GNU/Linux!
Email: Michael.Meskes@gmx.net | Use PostgreSQL!