|
-
February 11th, 2005, 09:24 AM
#3
Re: Retreiving return value from stored procedure in C++
This is where I am confused, the SP uses the 'set nocount on' in order to suppress the "# records affected" messages. I am not even sure that this is needed, I am looking at examples and reading tryng to find the best methods.
Using query analyzer, just calling the updateData SP does not return any value, just states "The command(s) completed successfully". I have to use the format:
Code:
exec val=updateData val1, val2, val3
in order for the integer to be returned INTO the val variable or for the value top be seen at all. Note that val needs to be passed in with the command string.
This is the crux of my question, using the RS1->Open(...) how do I get the SP to return the integer in to the passed variable? The way I have it setup is wrong, and I can't figure out how to make it right.
Can you jot down the modified SP and also the open method command you are referring to? i will look into the command object method as well, but this should work this way.
This may be really simple, but I get these mental blocks from time to time and can't see the forest because of all the trees.
Thanks in advance.
There are 10 types of people in the world, those that understand binary and those that don't. 
Using VS 2010
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|