Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Truncated OUTPUT Stored Procedure Values

Reply
Thread Tools

Truncated OUTPUT Stored Procedure Values

 
 
Chris
Guest
Posts: n/a
 
      04-10-2006
Hi,

I created the SQL 2005 stored procedure below:

CREATE PROCEDURE [dbo].[STP_val_deliverable_path]
@s_no smallint,
@deliverable_path nvarchar(255) OUTPUT

When I run in ASP.NET 2005 the stored procedure from server explorer I
get the value 'X:\my directory.......'.

When I run the procedure from code:

Dim var_deliverable_path As String

Dim cmm_select As New SqlCommand("STP_val_deliverable_path",
connection)
cmm_select.CommandType = Data.CommandType.StoredProcedure

var_param = New SqlParameter
var_param.ParameterName = "deliverable_path"
var_param.Direction = Data.ParameterDirection.Output
var_param.Value = "C:\"
cmm_select.Parameters.Add(var_param)

cmm_select.Connection.Open()

cmm_select.ExecuteNonQuery()

cmm_select.Connection.Close()

var_deliverable_path =
CType(cmm_select.Parameters("deliverable_path").Va lue, String)

The var_deliverable_path has the value of 'X' only, not the whole
string.

What could be the problem ?

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
'Procedure or function <stored procedure name> has too many arguments specified',,,ARGH! Mike P ASP .Net 0 06-19-2006 01:19 PM
SQL Server Stored Procedure with Output Parameter and ASP.NET SQLCommand Mr Not So Know It All ASP .Net 4 01-17-2006 07:24 PM
Cannot get OUTPUT parameter after running Sql stored procedure MS ASP .Net 5 01-31-2005 08:09 AM
Stored procedure parameter output value Steven ASP .Net 5 05-27-2004 03:16 AM
MS DataAccess Block and Stored Procedure Output Parameter Craig Buchanan ASP .Net 1 12-13-2003 09:18 AM



Advertisments