Home » Developer & Programmer » Precompilers, OCI & OCCI » Declare Table ....Semantics
Declare Table ....Semantics [message #338001] Sat, 02 August 2008 03:19 Go to next message
santosh.chalikwar
Messages: 6
Registered: July 2008
Junior Member
Hi All,
I am trying to connect with a remote data base using PRO*C.
If I use
proc filename.pc in make file..I am getting no error and code is working fine.

but If I use
proc sqlcheck=semantics userid=abc/lmn@xyz filename.pc
I am getting undefined identifier remoteschema.remotetable name.
user id mentioned in my make file describes my local data base.

At first glance I thought I have to declare this table in my .pc
file.
so I use EXEC DECLARE tablename TABLE
(col name type null,
*******
);
But still I am getting the same error.
Please Help Me.
Re: Declare Table ....Semantics [message #338004 is a reply to message #338001] Sat, 02 August 2008 03:47 Go to previous messageGo to next message
Michel Cadot
Messages: 68716
Registered: March 2007
Location: Saint-Maur, France, https...
Senior Member
Account Moderator
With "sqlcheck=semantics" Pro*C compiler checks all objects with the connection string you gave.
Connect with SQL*Plus with the same connection string and check if you can see " remoteschema.remotetable".

Regards
Michel
Re: Declare Table ....Semantics [message #338005 is a reply to message #338004] Sat, 02 August 2008 03:55 Go to previous messageGo to next message
santosh.chalikwar
Messages: 6
Registered: July 2008
Junior Member
Thanks for your reply,
But I would like to know whether there is any other way ....
Coz I dont want to change my make file(not passible for some reasons) ..but I can change my .pc file.

One more thing I am using declare table statement but actually it is a synonym (view) created on a remote database table.
So Do I need to change my EXEC SQL DECLARE TABLE statement?
Re: Declare Table ....Semantics [message #338024 is a reply to message #338005] Sat, 02 August 2008 09:52 Go to previous message
Michel Cadot
Messages: 68716
Registered: March 2007
Location: Saint-Maur, France, https...
Senior Member
Account Moderator
The name in the "DECLARE TABLE" must the same than in the code.
Without it I can't say more.

Regards
Michel
Previous Topic: compiling C++ code with Pro*C
Next Topic: cursor
Goto Forum:
  


Current Time: Thu Nov 21 11:41:59 CST 2024