Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> 2 newbie OCI questions
Hi everyone -
I'll start with my general question: where can I get doc for the Oracle call interface? I have the doc from Oracle, but I'm finding it hard starting out. I've used code from the examples, but am still having problems understanding exactly what's going on. None of the Oracle books I've seen, including the otherwise fine "ORACLE8, The Complete Reference", have anything about OCI. Also, the pointer to the OCI wrapper that someone provided seems to be dead. Arggghhh....
So on to my second question: Am I on the right track? I'm having various
problems trying to process dynamically generated SQL. My code allocates the
handles it needs (per code I borrowed from cdemo81.c). I don't do a bind,
because I'm not using any bind variables. I prepare the statement & get the
statement handle, call OCIStmtExec(), then use a sequence of OCIParamGet() and
OCIAttrGet() calls to get the number of columns, the column names, and the
datatypes. So far, so good. Then I call OCIDefineByPos() for each column,
using the datatypes I got from before. Finally, I call OCIStmtExec() again
(with iterations set to 1, next few params set to 0, and mode set to
OCI_DEFAULT). This is supposed to fill in all the addresses I specified with
the define, right?
This all seems to go OK except for the following problems:
And finally--how do I get the next row? If I call OCIStmtExec() again, I get the same row back.
Thanks in advance for any help & apologies if this is all in a FAQ someplace
(I looked but didn't find...)
-----------== Posted via Deja News, The Discussion Network ==---------- http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own Received on Wed Apr 21 1999 - 16:27:50 CDT