Truncated OUTPUT Stored Procedure Values

Discussion in 'ASP .Net' started by Chris, Apr 10, 2006.

  1. Chris

    Chris Guest

    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").Value, String)

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

    What could be the problem ?
     
    Chris, Apr 10, 2006
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Steven
    Replies:
    5
    Views:
    5,960
    Jeff Louie
    May 27, 2004
  2. Craig Buchanan
    Replies:
    1
    Views:
    423
  3. MS
    Replies:
    5
    Views:
    11,502
    Marc Scheuner [MVP ADSI]
    Jan 31, 2005
  4. Mr Not So Know It All
    Replies:
    4
    Views:
    23,421
    Mr Not So Know It All
    Jan 17, 2006
  5. Mike P
    Replies:
    0
    Views:
    3,371
    Mike P
    Jun 19, 2006
Loading...

Share This Page