Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Calling a Stored Procedure with Output Parameter
Message
From
25/06/2010 18:29:45
Timothy Bryan
Sharpline Consultants
Conroe, Texas, United States
 
General information
Forum:
ASP.NET
Category:
The Mere Mortals .NET Framework
Miscellaneous
Thread ID:
01470620
Message ID:
01470650
Views:
26
>>>>
>>>>
>>>>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform