ProC and dynamic selects using SQLDA?
Date: 1997/03/11
Message-ID: <3324f231.0_at_news.usinternet.com>#1/1
[Quoted] [Quoted] Does anyone out there have any references on doing dynamic select [Quoted] statements (with completely unknown result-sets) under ProC? I need to duplicate some stuff I wrote for Ingres to work under Oracle, but can't find any documentation on how to do this. Even Oracle's own manual (the one claiming to be for C programmers) states that it's an advanced topic, and not covered.
[Quoted] Under Ingres, the basics look like:
exec sql declare stmt statement;
exec sql declare :cursorname cursor for stmt;
exec sql prepare stmt from :qrystr;
sqlda = sqlda_new(MAX_ELEMS);
exec sql describe stmt into :sqlda;
/* allocate result-vars */
for (i = 0; i < sqlda->sqld; i++) {
sqv = &sqlda->sqlvar[i]; [ big switch on sqv->sqltype, with calls to allocate space for appropriate result-types and null-indicators omitted ... ]
}
exec sql open :cursorname;
...
[Quoted] That's the basics under Ingres, anyways. Can anyone give me some tips for Oracle? I'd like to stay away from OCI if possible.
Thanks in advance!
Ken Frank
kenf_at_usinternet.com
[Quoted] PS - Is it just me, or is a post to this newsgroup pretty much
guaranteed to get you on every spammers mailing list? Received on Tue Mar 11 1997 - 00:00:00 CET