Proper way of doing this?
Please disregard some variables.
Imports Oracle.DataAccess.Client
Imports Oracle.DataAccess.Types
Public Class Addcage
Dim conn As New OracleConnection
Private cmd As OracleCommand
Private da As OracleDataAdapter
Private cb As OracleCommandBuilder
Private ds As DataSet
Dim roomprice As Integer
Dim roomtitle As String
Dim lubid As String = "User Id= PETHOTEL" & ";Password= 911" & ";Data Source = xe"
Private Sub Addcage_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
roomprice = CInt(roomcost.Text)
roomtitle = roomname.Text
Try
conn.ConnectionString = lubid
conn.Open()
Dim sql As String = "INSERT INTO CAGETYPE (CAGECOST, CAGENAME) VALUES('" & roomprice & "'," & roomtitle & ")"
conn.BeginTransaction(sql)
MsgBox("adding complete")
Catch ex As Exception
MsgBox(ex.Message)
conn.Close()
End Try
conn.Close()
End Sub
End Class