我是 VB 的新手,我正在尝试将值/详细信息添加到 oracle DB 中,但我在这里遇到了一些问题。我想存储我已经创建到 oracle DB 的连接的文本框中的信息并存储它们。我希望有人能指导我。谢谢。
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