Link to home
Start Free TrialLog in
Avatar of kenhoppe
kenhoppe

asked on

CDatabase using C++

Hello All,

I am new to using C++ MFC CDatabase class to call a stored procedure.  Can anyone provide a source to learn how to call a stored procedure and return a record set.  I am passing 4 input parameters and return 3 output parameters.

thanks in advance...

regards,

Ken
Avatar of jkr
jkr
Flag of Germany image

Take a look at http://www.codeproject.com/database/myrecordset.asp ("Two classes for parameterized SQL statement and stored procedure")
You can use the CRecordset class:

  CRecordset rset(pdb);   // pass the CDatabase pointer
  if (!rset.Open(CRecordset::snapshot, "{call OverDueAccts}"))
  {
          // something goes wrong
  }


Regards, Alex
ASKER CERTIFIED SOLUTION
Avatar of itsmeandnobodyelse
itsmeandnobodyelse
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial