|
-
Mar 12th, 2013, 08:53 PM
#1
Thread Starter
New Member
[RESOLVED] insert values in oracle DB
I am new to VB, i am trying to add values/details into oracle DB but i am facing some problem here. I want to store the information from the textbox that i already created the make connection to oracle DB and store them. I hope someone will guide me. Thanks.
Code:
Private Sub Command1_Click()
Dim oconn As ADODB.Connection
Dim rs As ADODB.Recordset
Dim strSQL As String
Set oconn = New ADODB.Connection
Set rs = New ADODB.Recordset
oconn.Open "DRIVER = ODBC;DSN=sss;UID=sss;PWD=sss;DATABASE=sss"
strSQL = "INSERT INTO ZZZJUNKPERSON ( ID_NO, NAME, GENDER, ADDRESS, PHONE_NO ) " _
& "VALUES ( '" & Form2.Text1.Text & "', " _
& "' " & Form2.Text2.Text & "', " _
& "' " & Form2.Text3.Text & "', " _
& "' " & Form2.Text4.Text & "', " _
& "' " & Form2.Text5.Text & "')"
End Sub
-
Mar 12th, 2013, 10:59 PM
#2
Re: insert values in oracle DB
You need to execute the sql instruction, something like :
Code:
ocnnn.Execute strSQL
JG
... If your problem is fixed don't forget to mark your threads as resolved using the Thread Tools menu ...
-
Mar 13th, 2013, 12:53 AM
#3
Thread Starter
New Member
Re: insert values in oracle DB
 Originally Posted by jggtz
You need to execute the sql instruction, something like :
Code:
ocnnn.Execute strSQL
thanks man
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|