#include <oci.h>
#include <stdio.h>
#include <sqlca.h>
void main()
{
char *url = "web/dreamsys";
char data[30];
EXEC SQL CONNECT :url;
EXEC SQL SELECT VAL INTO :data FROM TMP;
printf("val: %s\n", data);
}
now, when I run it with MODE=ORACLE, here is what I get:
C:\work\db>proc getstuff.pc MODE=ORACLE
Semantic error at line 10, column 22, file getstuff.pc:
EXEC SQL CONNECT :url;
.....................1
PCC-S-02322, found undefined identifier
Semantic error at line 11, column 30, file getstuff.pc:
EXEC SQL SELECT VAL INTO :data FROM TMP;
.............................1
PCC-S-02322, found undefined identifier
Am I wrong here? Shouldn't this work with MODE=ORACLE?
If I put the "EXEC SQL BEGIN DECLARE SECTION;" around it then it
works, but I need to be able to not use that...
Thanks!
What is the difference with your post 15 hours earlier?
--
Regards
Michel Cadot
I really hate people like you, what was the point of your post, to
prove what a dick you are? If you really want to know the difference,
it was on another group and it had code posted with it.
http://www.catb.org/~esr/faqs/smart-questions.html
--
Jonathan Leffler #include <disclaimer.h>
Email: jlef...@earthlink.net, jlef...@us.ibm.com
Guardian of DBD::Informix v2003.04 -- http://dbi.perl.org/
Why? You *must* declare ALL your bind variables in the declare section!
Sybrand Bakker
Senior Oracle DBA
1. Try to find an answer by searching the Web.
- I did tons of searching about this and found nothing.
2. Try to find an answer by reading the manual.
- The manual doesn't seem to covert this problem. I post because
according to the manual, what I am doing should work.
3. Try to find an answer by reading a FAQ.
- Again, nothing found on the problem here.
4. Try to find an answer by inspection or experimentation.
- Did tons of experimenting, even with the simplest piece of code
which was posted above.
5. Try to find an answer by asking a skilled friend.
- I don't know anyone with Pro*C experience, sorry!
6. If you are a programmer, try to find an answer by reading the
source code.
- This is not applicable in this case.
Jonathan Leffler <jlef...@earthlink.net> wrote in message news:<uMQ%c.10962$w%6.7...@newsread1.news.pas.earthlink.net>...
Not according to the documentation. If you use MODE=ORACLE it is
supposed to pick up bind variables without the declare section. There
are also many articles and posts that say this on the 'net. My
problem is that this mode doesn't seem to work for me.