C
Chris
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 ?
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 ?