Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Calling a Stored Procedure, the parameter is truncated
Message
From
05/06/2003 15:47:45
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Calling a Stored Procedure, the parameter is truncated
Miscellaneous
Thread ID:
00796915
Message ID:
00796915
Views:
40
Hi,

I am trying to call a stored procedure (in SQL server with ODBC driver) using a CursorAdapter.UpdateCmd or using a SQLEXEC() function sending something like this:



EXEC sp_xxxx ?cVar

IF cVar is less than 255 (cVar=REPLIC("X",254) for example) it works fine. SQL will receive something like this:

exec sp_executesql N'EXEC sp_PaiFilho @P1 ', N'@P1 varchar(254)','XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'

But if cVar is equal or greater than 255, than SQL will receive something like this:


exec sp_executesql N'EXEC sp_PaiFilho @P1 ', N'@P1 text', 'XXXXXXXXXXXXXXXX'

In this case the parameter is "text" but the string is truncated to 16 characters only.

Does somebody know why?

Thanks.
Ricardo.
Next
Reply
Map
View

Click here to load this message in the networking platform