adding new row to a DB

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • akoymakoy
    New Member
    • Oct 2006
    • 42

    adding new row to a DB

    Basically what this command button does is it splits a record with 2 words and assigns the 1st word to the original cell and adds a new row but assigns the second word to the new row, but it doesnt work

    Set MyConn = New ADODB.Connectio n
    MyConn.Connecti onString = "Provider=Micro soft.Jet.OLEDB. 4.0;Data Source=C:\Thesi s\testing\gary\ test1.mdb;"
    MyConn.Open
    Set MyRecSet = New ADODB.Recordset
    MyRecSet.Cursor Location = adUseClient
    MyRecSet.Open "SELECT * FROM Table2 ORDER BY tag", MyConn.Connecti onString, adOpenKeyset, adLockPessimist ic
    Do Until MyRecSet.EOF
    ToBeSplit = MyRecSet.Fields (1).Value

    wordset = Split(ToBeSplit , ";")
    If UBound(wordset) > 0 Then

    For ctr2 = 1 To UBound(wordset)
    'THIS IS THE PART I DONT KNOW WHAT TO DO:
    ADDNEW ROW
    copy myrecset(0) to the myrecset(0) of new row
    assign to myrecset(1) the value of wordset(ctr2)
    Next ctr2

    MyRecSet.MoveNe xt

    End If

    Loop
    MyConn.Close
  • akoymakoy
    New Member
    • Oct 2006
    • 42

    #2
    nevermind i did it already.. hehe but pls look at the previous post i did regarding filelist and dirlist... THANKS

    Comment

    • sashi
      Recognized Expert Top Contributor
      • Jun 2006
      • 1749

      #3
      Originally posted by akoymakoy
      nevermind i did it already.. hehe but pls look at the previous post i did regarding filelist and dirlist... THANKS
      Hi there,

      Good luck on your experiment. Take care.

      Comment

      Working...