Calling SQL Server 7 Stored Procedures from C++

|
andyhud
(Inactive)
Fleet, Surrey, England
|
I am having trouble calling a SQL Server 7.0 Stored Procedure from C++ that returns a recordset and an output parameter.
Here's the criteria - I wish to bind parameters at run time and I need to return an output parameter. Presumably, I need to use rs.Open not execute in order to get the recordset - the problem is that I don't get the output parameters if I am opening the recordset. The stored procedure may change so I don't really want to implement a static wrapper for it. I have tried to implement this with ADO, MFC DAO and MFC ODBC support classes.
A sample piece of code that does exactly what I need would be ideal...
|
Posted 20 years ago (Thread Starter)
|
|
About andyhud |
|
Inactive member.
Member does not subscribe to this thread.
Email Not Verified!
Once email is verified, we will review and approve the account.
|
Web Presence Hidden.
Once above is taken care of, full Profile content will display including back links, about me, my message, custom Profile html,
social networking links, message board signature, company profile, etc.
|
Post ID #1994, 3 replies
Thread Started 5/3/2001 10:13:00 PM
View Counter=4119
Last Reply Posted 9/27/2002 4:49:00 PM)
|
|
|
Location=Fleet, Surrey, England
|
|
 |
|
andyhud
(Inactive)
Fleet, Surrey, England
|
Thanks for your reply VBcrew but I'm afraid that won't return me a recordset which is why open is used rather than execute.
|
Posted 20 years ago (Thread Starter)
|
|
About andyhud |
|
Inactive member.
Member does not subscribe to this thread.
Email Not Verified!
Once email is verified, we will review and approve the account.
|
Web Presence Hidden.
Once above is taken care of, full Profile content will display including back links, about me, my message, custom Profile html,
social networking links, message board signature, company profile, etc.
|
Post ID #2975 (Level 1.1)
Reply to 1994
Thread Started 7/13/2001 12:51:00 AM
View Counter=2
|
|
|
Location=Fleet, Surrey, England
|
|
 |
|
VBcrew
|
I did that on VB so I would like to try. I would use rs.execute instead. Code will like this: ..... rs.parameter(0)= somthing rs.parameter(1)=somthing /suppose rs.parameter(1) is the return parameter./ rs.execute print rs.parameter(1) rs.close The code is different from C++/DAO/ADO because I am using VB and RDO but you get the idea...
|
Posted 20 years ago
|
|
About VBcrew |
|
Membership pending.
Member subscribes to this thread but email is NOT VERIFIED.
Email Not Verified!
Once email is verified, we will review and approve the account.
|
Web Presence Hidden.
Once above is taken care of, full Profile content will display including back links, about me, my message, custom Profile html,
social networking links, message board signature, company profile, etc.
|
Post ID #2970 (Level 1.2)
Reply to 1994
Reply Posted 7/12/2001 3:57:00 PM
|
|
|
Location=LA
|
|
 |
Most Recent Post
|
VBcrew
|
It will work, It will work. I try it before.
|
Posted 19 years ago
|
|
About VBcrew |
|
Membership pending.
Member subscribes to this thread but email is NOT VERIFIED.
Email Not Verified!
Once email is verified, we will review and approve the account.
|
Web Presence Hidden.
Once above is taken care of, full Profile content will display including back links, about me, my message, custom Profile html,
social networking links, message board signature, company profile, etc.
|
Post ID #7716 (Level 1.3)
Reply to 1994
Reply Posted 9/27/2002 4:49:00 PM
|
|
|
Location=LA
|
|
Revive Thread!
Add a comment to revive this old thread and make this archived thread more useful.
Thread #1994 Counter |
4119 |
Since 4/2/2008
|
|
|
|