Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Dim conSQL As New SqlConnection(strSQLConnection)
conSQL.Open()
Dim cmdSQL As New SqlCommand("sp_inventory", conSQL)
cmdSQL.CommandType = CommandType.StoredProcedure
Dim paramResult As New SqlParameter
paramResult.ParameterName = "@TotalUnit1"
paramResult.Direction = ParameterDirection.Output
cmdSQL.Parameters.Add(paramResult)
Literal1.Text = cmdSQL.Parameters("@TotalUnit1").Value.ToString
cmdSQL.ExecuteNonQuery()
conSQL.Close()
End Sub
|