Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Calling a Stored Procedure with Output Parameter
Message
 
 
À
25/06/2010 18:22:33
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:
01470648
Vues:
23
>>>
>>>
>>>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 ?
If it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform