Home » Developer & Programmer » Precompilers, OCI & OCCI » PLS-S-00201, identifier 'TABLE' must be declared (Oracle 10g in HP-UX B.11.11)
PLS-S-00201, identifier 'TABLE' must be declared [message #322015] Thu, 22 May 2008 02:51 Go to next message
donato
Messages: 53
Registered: November 2007
Location: Barcelona, Spain
Member
Hello,

I'm trying to compile the example program of the Oracle's documentation.

I'm using this precompiler options:
MODE=ANSI
CLOSE_ON_COMMIT=NO
DYNAMIC=ANSI
CODE=ANSI_C


Therefore, i add to the program source this clauses (in the correct place):
EXEC SQL BEGIN DECLARE SECTION;
EXEC SQL END DECLARE SECTION;


Well, i'm think all is fine. But i obtain this error:
PLS-S-00201, identifier 'EMP' must be declared


If a try to compile a simplest program, like that:
#include <stdio.h>
#include <myLibrary.h>
short main(int argc, char **argv)
{
	EXEC SQL BEGIN DECLARE SECTION;
		int status;
	EXEC SQL END DECLARE SECTION;
	
	/* This is an extern function that connects to oracle */
	dbconnect();	

	
	EXEC SQL 
	SELECT 1
	INTO :status
	FROM DUAL;
	
	/* This is an extern function that makes a rollback to oracle */
	dbrollback();
}

I'll obtain the same error, in this case with 'DUAL'.


Can you help me, please?
Re: PLS-S-00201, identifier 'TABLE' must be declared [message #322020 is a reply to message #322015] Thu, 22 May 2008 03:12 Go to previous message
donato
Messages: 53
Registered: November 2007
Location: Barcelona, Spain
Member
Hello,
I solve my problem.

I have to add the 'USERID' precompiler option, and also put:
#include <sqlca.h>


Thanks so much!
Previous Topic: shell script for sql queries
Next Topic: IPv6 support for oci 10.1.0.4
Goto Forum:
  


Current Time: Sun Dec 11 06:04:33 CST 2016

Total time taken to generate the page: 0.09302 seconds