Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Calling a Stored Procedure with Output Parameter
Message
De
25/06/2010 18:29:45
Timothy Bryan
Sharpline Consultants
Conroe, Texas, États-Unis
 
 
Information générale
Forum:
ASP.NET
Catégorie:
The Mere Mortals .NET Framework
Divers
Thread ID:
01470620
Message ID:
01470650
Vues:
27
>>>>
>>>>
>>>>SET ANSI_NULLS ON
>>>>GO
>>>>SET QUOTED_IDENTIFIER ON
>>>>GO
>>>>
>>>>ALTER PROCEDURE [dbo].[GetNextNumber] 
>>>>	@NextNumber varchar(10) Output
>>>>AS
>>>>BEGIN
>>>>	SET NOCOUNT ON;
>>>>
>>>>   Set @NextNumber = '0000001045'
>>>>END
>>>>
>>>>
>>>>
>>>>What could be missing from the stored procedure?
>>>
>>>You declared parameter as varchar(10), so it's going to be truncated. Declare it as varchar(50) at least.
>>
>>I am confused, the value I set was only 10 chars long. What would get truncated?
>
>You're right, I miscounted. Did you also pass 10 0s ?

Yes, as a string
Timothy Bryan
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform