Connection to Oracle database along with insert/delete example.
Connection to Oracle database along with insert/delete example.
API Declarations
Dim rs As New ADODB.Recordset
Dim sql As String
Rate Connection to Oracle database along with insert/delete example.
(1(1 Vote))
txtidval = txtid.Text
txtnameval = txtname.Text
txtaddrval = txtaddr.Text
txtcityval = txtcity.Text
txtcountryval = txtcountry.Text
txtphoneval = txtphone.Text
txtfaxval = txtfax.Text
rtbremarksval = rtbremarks.Text
If Option1.Value = True Then
optdepval = "Mgt"
ElseIf Option2.Value = True Then
optdepval = "Adm"
ElseIf Option3.Value = True Then
optdepval = "Sale"
Else
optdepval = "Prod"
End If
sql = "insert into employees(empid,empname) values(" & "'" & txtidval & "','" & txtnameval & "');" & "&"
objcn.Execute (sql)
MsgBox "Details Updated"
clear
End Sub
Private Sub clear()
txtid.Text = ""
txtname.Text = ""
txtaddr.Text = ""
txtcity.Text = ""
txtcountry.Text = ""
txtphone.Text = ""
txtfax.Text = ""
rtbremarks.Text = ""
End Sub
Private Sub Command2_Click()
objrs.Close
objcn.Close
End
End Sub
Private Sub Form_Load()
objcn.Open "dsn=saran"
End Sub
Connection to Oracle database along with insert/delete example. Comments
No comments yet — be the first to post one!
Post a Comment