Solved

SQLBindParameter question..

Posted on 1998-10-27
1
243 Views
Last Modified: 2013-11-20
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.
0
Comment
Question by:stephenkong
1 Comment
 

Accepted Solution

by:
jinda earned 0 total points
ID: 1323905
Example:

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,
            SQC_C_BINARY,
            SQL_BINARY,
            lSize, 0, Value, 0, &cb_value);

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

..
}


0

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Separate files macro - Errors on larger data set 18 56
fizzArray2 challenge 1 56
no14 challenge 14 56
Not needed 13 53
This is to be the first in a series of articles demonstrating the development of a complete windows based application using the MFC classes.  I’ll try to keep each article focused on one (or a couple) of the tasks that one may meet.   Introductio…
Introduction: Load and Save to file, Document-View interaction inside the SDI. Continuing from the second article about sudoku.   Open the project in visual studio. From the class view select CSudokuDoc and double click to open the header …
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now