Redeclaring a bind variable in proC [message #297552] |
Fri, 01 February 2008 05:56 |
nitinnangia
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 (8.1.7.0.0)
|
|
|
Re: Redeclaring a bind variable in proC [message #297558 is a reply to message #297552] |
Fri, 01 February 2008 06:08 |
|
Michel Cadot
Messages: 68731 Registered: March 2007 Location: Saint-Maur, France, https...
|
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.
Regards
Michel
|
|
|