Information générale
Titre:
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.
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement