Проектирование схемы БД в среде ERwin. Проблема избыточности данных. Проблема обновления данных. Проблема удаления данных., страница 19

checkcommand.Parameters.Add(New Data.OracleClient.OracleParameter("srv1", System.Data.DbType.Int32, 20))                 checkcommand.Parameters.Add(New Data.OracleClient.OracleParameter("app1", System.Data.DbType.Int32, 20))                 checkcommand.Parameters.Add(New Data.OracleClient.OracleParameter("num", System.Data.DbType.Int32, 10))

checkcommand.Parameters.Add(New Data.OracleClient.OracleParameter("num1", System.Data.DbType.Int32, 10))

checkcommand.Parameters("num").Direction = ParameterDirection.Output                 checkcommand.Parameters("num1").Direction = ParameterDirection.Output                 checkcommand.Parameters("srv1").Value = TextBox5.Text                 checkcommand.Parameters("app1").Value = TextBox2.Text

checkcommand.Connection.Open()

Try

checkcommand.ExecuteNonQuery()

Catch ex As Exception

End Try

If checkcommand.Parameters("num").Value = 0 Then

Response.Redirect("no_such_srv.aspx")

Else

If checkcommand.Parameters("num1").Value = 0 Then

Response.Redirect("wrong_type.aspx")

Else

Response.Redirect("successful_closing.aspx")

End If

End If

End If

End If

End Sub

Private Sub Button11_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button11.Click

If TextBox2.Text = "" Then

Response.Redirect("choose_app.aspx")

Else

If TextBox7.Text = "" Then

Response.Redirect("no_price.aspx")

Else

Dim con As Data.OracleClient.OracleConnection

con = New Data.OracleClient.OracleConnection("user id=dev;data source=katestr;password=developer")

Dim checkcommand As Data.OracleClient.OracleCommand                 Dim check As String = "DEV.WEB_CREATE_SRV"                 checkcommand = New Data.OracleClient.OracleCommand(check, con)                 checkcommand.CommandType = CommandType.StoredProcedure

checkcommand.Parameters.Add(New Data.OracleClient.OracleParameter("srv1", System.Data.OracleClient.OracleType.Number, 20))                 checkcommand.Parameters.Add(New Data.OracleClient.OracleParameter("app1", System.Data.OracleClient.OracleType.Number, 20))                 checkcommand.Parameters.Add(New Data.OracleClient.OracleParameter("price1", System.Data.OracleClient.OracleType.Number, 20))                 checkcommand.Parameters.Add(New Data.OracleClient.OracleParameter("tar", System.Data.OracleClient.OracleType.Number, 20))

checkcommand.Parameters.Add(New Data.OracleClient.OracleParameter("num1", System.Data.OracleClient.OracleType.Number, 10))

checkcommand.Parameters.Add(New Data.OracleClient.OracleParameter("num2", System.Data.OracleClient.OracleType.Number, 10))

checkcommand.Parameters.Add(New Data.OracleClient.OracleParameter("num3", System.Data.OracleClient.OracleType.Number, 10))

checkcommand.Parameters.Add(New Data.OracleClient.OracleParameter("quan", System.Data.OracleClient.OracleType.Number, 10))                 checkcommand.Parameters("num1").Direction = ParameterDirection.Output                 checkcommand.Parameters("num2").Direction = ParameterDirection.Output                 checkcommand.Parameters("num3").Direction = ParameterDirection.Output                 checkcommand.Parameters("quan").Direction = ParameterDirection.Output                 checkcommand.Parameters("srv1").Value = DropDownList4.SelectedValue                 checkcommand.Parameters("app1").Value = TextBox2.Text                 checkcommand.Parameters("tar").Value = DropDownList2.SelectedValue                 checkcommand.Parameters("price1").Value = TextBox7.Text

checkcommand.Connection.Open()

Try

checkcommand.ExecuteNonQuery()

Catch ex As Exception

End Try

If checkcommand.Parameters("num1").Value = 0 Then