VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Connection to Oracle database along with insert/delete example.

by saravanan (1 Submission)
Category: Databases/Data Access/DAO/ADO
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Mon 28th January 2002
Date Added: Mon 8th February 2021
Rating: (1 Votes)

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.




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


Download this snippet    Add to My Saved Code

Connection to Oracle database along with insert/delete example. Comments

No comments have been posted about Connection to Oracle database along with insert/delete example.. Why not be the first to post a comment about Connection to Oracle database along with insert/delete example..

Post your comment

Subject:
Message:
0/1000 characters