Hi Am trying to execute a very basic stored proc (sybase)
It appears to run fine but no values get returned
It works perfectly when i execute it through sql advantage
any ideas?
here is code
CREATE PROC test
(
@person numeric(8, 0),
@name numeric(8, 0) OUTPUT
)
AS
IF @person = 1
SELECT @name =23
.NET Code
myCommand = New OleDbCommand("test", objConnect)
myCommand.CommandType = CommandType.StoredProcedure
myParam = myCommand.Parameters.Add("@person", OleDbType.numeric, 8)
myParam.SourceColumn = "person"
myParam = myCommand.Parameters.Add("@name", OleDbType.numeric,8)
myParam.Direction = ParameterDirection.Output
myParam.SourceColumn = "name"
objConnect.Open()
myCommand.ExecuteNonQuery()
Response.Write(myCommand.Parameters("@name".Value.ToString())
objConnect.Close()
thanks in advance
;-)
It appears to run fine but no values get returned
It works perfectly when i execute it through sql advantage
any ideas?
here is code
CREATE PROC test
(
@person numeric(8, 0),
@name numeric(8, 0) OUTPUT
)
AS
IF @person = 1
SELECT @name =23
.NET Code
myCommand = New OleDbCommand("test", objConnect)
myCommand.CommandType = CommandType.StoredProcedure
myParam = myCommand.Parameters.Add("@person", OleDbType.numeric, 8)
myParam.SourceColumn = "person"
myParam = myCommand.Parameters.Add("@name", OleDbType.numeric,8)
myParam.Direction = ParameterDirection.Output
myParam.SourceColumn = "name"
objConnect.Open()
myCommand.ExecuteNonQuery()
Response.Write(myCommand.Parameters("@name".Value.ToString())
objConnect.Close()
thanks in advance
;-)