• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 266
  • Last Modified:

SQLBindParameter question..

I found SQLBindParameter is very difficult to use, even I read all help files, I still could not be able to use it. Could anyone give me some helpful tips about using this API please.
1 Solution

void MyFunction( void* Value, long lSize )
SDWORD cb_value;
CString strStmt;
long lID = 101;

strStmt.Format( "insert into myTable"
            " ( ID, BINARYVALUE )"
            " values"
            " (%ld, ?)",
            lID );

cb_value = lSize;

nRc = SQLBindParameter( hStmt, 1, SQL_PARAM_INPUT,
            lSize, 0, Value, 0, &cb_value);

nRc = SQLExecDirect( hStmt, (unsigned char*)(LPCSTR)strStmt, SQL_NTS);


Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

The 14th Annual Expert Award Winners

The results are in! Meet the top members of our 2017 Expert Awards. Congratulations to all who qualified!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now