dbrpcparam datalen problem

This is a discussion on dbrpcparam datalen problem within the MySQL Database forums, part of the Database Forums category; Hi, there I have this data binding in the C code: char szCounter[1025]; .... pSql->BindCharParam(12,"@Counter&...


Go Back   Usenet Forums > Database Forums > MySQL Database

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 03-27-2008
guangxiren@gmail.com
 
Posts: n/a
Default dbrpcparam datalen problem

Hi, there

I have this data binding in the C code:
char szCounter[1025];
....
pSql->BindCharParam(12,"@Counter",szCounter,TRUE,1024 );

I got a problem regarding the length of the datalen of dbrpcparam when
I tried to use it for the store procedure call:
dbrpcparam(..,SQLVARCHAR,..,1024, (BYTE *) szCounter)

When I used 1024 as the datalen, the store procedure call failed, but
if I changed the datalen to 256:
dbrpcparam(..,SQLVARCHAR,..,256, (BYTE *) szCounter),
it worked just fine!

The store procedure:
declare @Counter varchar(1024)
....
CREATE PROCEDURE ..,@Counter varchar(1024) output, ....

The databse is MSSQL.

Thanks!

Zhiyong Lu
guangxiren@gmail.com
Reply With Quote
  #2 (permalink)  
Old 03-28-2008
Michael Austin
 
Posts: n/a
Default Re: dbrpcparam datalen problem

guangxiren@gmail.com wrote:
> Hi, there


Hello...

> The databse is MSSQL.
>


Then why in the world did you post something mYsql newsgroup. Try a
sqlserver group.

> Thanks!
>
> Zhiyong Lu
> guangxiren@gmail.com

Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 05:33 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0