[freetds] SQLPutData error
Lowden, James K
LowdenJK at bernstein.com
Mon Mar 15 12:01:12 EST 2004
> From: brazilchina at mail.goo.ne.jp [mailto:brazilchina at mail.goo.ne.jp]
> Sent: March 12, 2004 9:09 PM
>
> I can't execute yet.
> Should I use right optino in configure or make.
> Please tell me how to execute the program using
> "SQLPutData",if you can.
You don't need to change any configure options. It seems you found a bug. Thanks.
Freddy is not sure how SQLPutData() should behave when the buffer length of the bound parameter is zero.
It's not clear to me what you're doing. In SQLBindParameter(), you specify a parameter buffer size of zero, but in SQLPutData(), you pass it a buffer of 3 bytes, not zero.
I think if you change your description of the size of cbName, your code will work (better).
HTH.
-jkl
> > > SQLBindParameter(hstmt,
> > > 2,
> > > SQL_PARAM_INPUT,
> > > SQL_C_CHAR,
> > > SQL_VARCHAR,
> > > 50,
> > > 0,
> > > (PTR)2,
> > > 0,
> > > &cbName);
> > >
> > > cbName = SQL_LEN_DATA_AT_EXEC(0);
> > > nId = 123;
> > > rc = SQLExecute( hstmt );
> > > while( rc == SQL_NEED_DATA ){
> > > rc = SQLParamData( hstmt, &pToken );
> > >
> > > if( rc == SQL_NEED_DATA ){
> > > SQLPutData( hstmt, "abc", 3);
> > > }
> > > }
> > > }
-----------------------------------------
The information contained in this transmission may contain privileged and confidential information and is intended only for the use of the person(s) named above. If you are not the intended recipient, or an employee or agent responsible for delivering this message to the intended recipient, any review, dissemination, distribution or duplication of this communication is strictly prohibited. If you are not the intended recipient, please contact the sender immediately by reply e-mail and destroy all copies of the original message. Please note that we do not accept account orders and/or instructions by e-mail, and therefore will not be responsible for carrying out such orders and/or instructions.
If you, as the intended recipient of this message, the purpose of which is to inform and update our clients, prospects and consultants of developments relating to our services and products, would not like to receive further e-mail correspondence from the sender, please "reply" to the sender indicating your wishes. In the U.S.: 1345 Avenue of the Americas, New York, NY 10105.
More information about the FreeTDS
mailing list