1 Reply Latest reply on Mar 25, 2006 1:04 AM by 433353

    Update record using VB6.0 and Oracle 10G Express Edition

    500908
      I have VB6.0 and Oracle 10G Express Edition in Windows 2000 Server. My procedure in VB 6.0 can't update record in the table using SQL statement, and the Error Message is " Missing SET keyword ".

      The SQL statement in VB6.0 look like this :

      General Declaration
      Dim conn as New ADODB.Connection
      Dim rs as New ADODB.Recordset

      Private Sub Command1_Click()
      dim sql as string

      sql = " UPDATE my_table " & _
      " SET Name = ' " & Text3.Text & " ' " & _
      " AND Unit = ' " & Text2.Text & " ' " & _
      " WHERE ID = ' " & Text1.Text & " ' "
      conn.Execute (sql)

      Private Sub Form Load()
      Set conn = New ADODB.Connection
      conn.Open "Provider=MSDASQL;" & "Data Source=my_table;"& "User ID =marketing;" & "Password=pass123;"

      I'm sorry about my language.

      What's wrong in my SQL statement, I need help ........ asap

      Best Regards,
      /Harso Adjie