Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All
Important This document may not represent best practices for current development, links to downloads and other resources may no longer be valid. Current recommended version can be found here.

CDatabase::BindParameters 

Override BindParameters when you need to bind parameters before calling CDatabase::ExecuteSQL.


virtual void BindParameters(
   HSTMT hstmt 
);

Parameters

hstmt

The ODBC statement handle for which you want to bind parameters.

This approach is useful when you do not need the result set from a stored procedure.

In your override, call SQLBindParameters and related ODBC functions to bind the parameters. MFC calls your override before your call to ExecuteSQL. You do not need to call SQLPrepare; ExecuteSQL calls SQLExecDirect and destroys the hstmt, which is used only once.

Community Additions

ADD
Show:
© 2015 Microsoft