Array in Visual Basic to Table in Database?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Sludge
    New Member
    • Sep 2007
    • 1

    Array in Visual Basic to Table in Database?

    Hi! I am brand new here.

    I am extracting data from a database table in access and then populating an array in visual basic (VBA in access currently). I would like to reformat this array and put the data into a new table in Access. Right now I am writing the output to a text file which I was thinking I could import back into access as a new table, but this seems redundant. I was wondering if anyone might be able to help me out with this. I am a VB newbie but am trying to learn fast; however, writing to a new table in access from VB is eluding me.

    Thanks in advance!
  • jesse07
    New Member
    • Sep 2007
    • 18

    #2
    I have a similiar problem I have an multidimentiona l array that I would like to enter the data into a new Table in Access. Did you figure this out yet? I also find the text file to be redundant, but Im not sure how to do this too.

    Comment

    • Killer42
      Recognized Expert Expert
      • Oct 2006
      • 8429

      #3
      Using an ADO recordset, you can just AddNew each array entry to the table as a new record. Or you can set up an SQL INSERT statement to do it, and run this against the Connection object, which will save you the bother of opening a recordset.

      Comment

      • jesse07
        New Member
        • Sep 2007
        • 18

        #4
        Originally posted by Killer42
        Using an ADO recordset, you can just AddNew each array entry to the table as a new record. Or you can set up an SQL INSERT statement to do it, and run this against the Connection object, which will save you the bother of opening a recordset.
        I will play around with an SQL insert.

        Thank you.

        Comment

        Working...