General information
Title:
Calling a Stored Procedure, the parameter is truncated
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
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only