PDA

View Full Version : Pro*C question


Rocky Dean Pulley
09-07-2004, 12:22 PM
I'm using Pro*C and I'm having a problem... Here is the simple code:

#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!


MyLounge.com Site Map
Forum: Cars, Cell Phone, Database, Games, Home Improvement, IT, Music, School, Sports, Web Design, Web Server, Weight Loss

The MyLounge.com forum is intended for informational use only and should not be relied upon and is not a substitute for any advice. The information contained on MyLounge.com are opinions and suggestions of members and is not a representation of the opinions of MyLounge.com. MyLounge.com does not warrant or vouch for the accuracy, completeness or usefulness of any postings or the qualifications of any person responding. Please consult a expert or seek the services of an attorney in your area for more accuracy on your specific situation. Please note that our forums also serve as mirrors to Usenet newsgroups. Many posts you see on our forums are made by newsgroup users who may not be members of MyLounge.com Term of Service