Quantcast
Channel: VBForums - Visual Basic 6 and Earlier
Viewing all articles
Browse latest Browse all 21925

[RESOLVED] insert values in oracle DB

$
0
0
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


Viewing all articles
Browse latest Browse all 21925

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>