Hi Folks
I have a situation where I need to call a stored proc in another package from my own stored proc to validate a value. The foreign stored proc accepts a value parameter to be validated, and returns a cursor with a single varchar value indicating valid / not valid.
I am unsure of how to handle this on my end. I know I have to call the proc by qualifying the package name.proc name (no problem there) and I need to pass the value to the foreign proc as a parameter. But how do I define the cursor returned in my proc? How do I then read the value out of the proc (I assume a Fetch statement of some sort)?
And finally I need to call this validation proc over and over again, so I assume each time I need to call it I have to close the cursor, and them re-open it to get the new value when it is called or there will be an wrror. Is that right?
Would very much appreciate a bit of direction. Thanks!
CraigHartz
I have a situation where I need to call a stored proc in another package from my own stored proc to validate a value. The foreign stored proc accepts a value parameter to be validated, and returns a cursor with a single varchar value indicating valid / not valid.
I am unsure of how to handle this on my end. I know I have to call the proc by qualifying the package name.proc name (no problem there) and I need to pass the value to the foreign proc as a parameter. But how do I define the cursor returned in my proc? How do I then read the value out of the proc (I assume a Fetch statement of some sort)?
And finally I need to call this validation proc over and over again, so I assume each time I need to call it I have to close the cursor, and them re-open it to get the new value when it is called or there will be an wrror. Is that right?
Would very much appreciate a bit of direction. Thanks!
CraigHartz