22,300
社区成员




Try
Dim myCmd As New SqlClient.SqlCommand
myCmd.CommandType = CommandType.StoredProcedure
myCmd.CommandTimeout = 0
myCmd.CommandText = "dbo.test "
myCmd.CommandTimeout = 0
myCmd.Connection = conn
myCmd.Connection.Open()
myCmd.Parameters.AddWithValue("@out_aft_nunn", SqlDbType.Int)
myCmd.Parameters("@out_aft_nunn").Direction = ParameterDirection.Output
myCmd.Parameters.AddWithValue("@out_mObjectNo", SqlDbType.Int)
myCmd.Parameters("@out_mObjectNo").Direction = ParameterDirection.Output
myCmd.ExecuteNonQuery()
Dim obj2 As Integer = myCmd.Parameters("@out_aft_nunn").Value
Catch ex As Exception
Throw
Finally
conn.Close()
End Try
.Direction = ParameterDirection.Output