Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Calling a Stored Procedure with Output Parameter
Message
 
 
To
25/06/2010 18:22:33
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:
01470648
Views:
22
>>>
>>>
>>>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform