Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Calling a Stored Procedure, the parameter is truncated
Message
De
05/06/2003 15:47:45
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
Calling a Stored Procedure, the parameter is truncated
Divers
Thread ID:
00796915
Message ID:
00796915
Vues:
39
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
Fil
Voir

Click here to load this message in the networking platform