Home » Developer & Programmer » Precompilers, OCI & OCCI » Redeclaring a bind variable in proC (Solaris 8)
Redeclaring a bind variable in proC [message #297552] Fri, 01 February 2008 05:56 Go to next message
Messages: 1
Registered: February 2008
Junior Member

I have a bind variable declared twice inside my .pc file , once in global scope as 'static long' and once inside a method scope as 'int'. The impact of this is that the fetch/sql query used inside the method scope returns arbitrary / junk values inside the bind variable which has been redeclared.

'int' itself is not a problem since if I use a different variable name whilst continuing to keep the 'int' the query returns proper values

Is there something specific to pro C wherein I cannot re-declare a global sql variable ?

I'm on Oracle8i Release 3 (
Re: Redeclaring a bind variable in proC [message #297558 is a reply to message #297552] Fri, 01 February 2008 06:08 Go to previous message
Michel Cadot
Messages: 63956
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
There is no sql variable.
This said, it depends on many things like Pro*C compilation options and how you declare the variables (inside a DECLARE section or not)...

One good programming practice is to name differently global and local variables. Try to follow good practices and you will not have such problems.

Previous Topic: Error while executing C exe
Next Topic: Proc Pro*C issues in Oracle 10g Really need help
Goto Forum:

Current Time: Fri Oct 28 15:13:05 CDT 2016

Total time taken to generate the page: 0.12628 seconds