dbTalk Databases Forums  

pro*c, cursors and indicator structs

comp.databases.oracle.misc comp.databases.oracle.misc


Discuss pro*c, cursors and indicator structs in the comp.databases.oracle.misc forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
John Nichol
 
Posts: n/a

Default pro*c, cursors and indicator structs - 02-15-2005 , 03:25 PM






I've hit a problem on pro*c at work and I'm not sure what's causing it - One
problem is that I'm not a pro*c programmer !

we have an oracle cursor declared and 2 pro*c structs which take the
contents of the cursor. the indicator struct has all variables listed as
short.

I assume that when a value is passed to the short, the resulting value tells
you about the status of the corresponding value held in the main struct -
and that -1 will result from the corresponding indicator struc.

We are passing a definite value in to this variable - 8.5 to be exact, but
the sql cursor also has an nvl(field, 0) as well, so it is impossible that a
null is being passed. Unfortunately the variable in the indicator struct
has passed back -1 every time.

Does anyone have any idea what is happening - is it just my lack of
understanding of c - I've asked a few other (slightly ) more experienced
colleagues, but they are all stumped.

If this isn't the right newsgroup, could someone point me to the right one?

Thanks

John






Reply With Quote
  #2  
Old   
John Nichol
 
Posts: n/a

Default Re: pro*c, cursors and indicator structs - 02-16-2005 , 03:26 PM






Its ok now - went in fresh this morning and saw the problem immediately.

regards

John
"John Nichol" <j1nichol (AT) btopenworld (DOT) com> wrote

Quote:
I've hit a problem on pro*c at work and I'm not sure what's causing it -
One
problem is that I'm not a pro*c programmer !

we have an oracle cursor declared and 2 pro*c structs which take the
contents of the cursor. the indicator struct has all variables listed as
short.

I assume that when a value is passed to the short, the resulting value
tells
you about the status of the corresponding value held in the main struct -
and that -1 will result from the corresponding indicator struc.

We are passing a definite value in to this variable - 8.5 to be exact, but
the sql cursor also has an nvl(field, 0) as well, so it is impossible that
a
null is being passed. Unfortunately the variable in the indicator struct
has passed back -1 every time.

Does anyone have any idea what is happening - is it just my lack of
understanding of c - I've asked a few other (slightly ) more experienced
colleagues, but they are all stumped.

If this isn't the right newsgroup, could someone point me to the right
one?

Thanks

John








Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.