Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.tools -> Pro*C question

Pro*C question

From: Rocky Dean Pulley <it_at_mikersoft.com>
Date: 7 Sep 2004 13:22:26 -0700
Message-ID: <5ae526a4.0409071222.74a37a30@posting.google.com>


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! Received on Tue Sep 07 2004 - 15:22:26 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US