By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,377 Members | 1,334 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,377 IT Pros & Developers. It's quick & easy.

dbrpcparam datalen problem

P: n/a
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.


Zhiyong Lu
Mar 27 '08 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.