Results 1 to 2 of 2

Thread: Insert Statement

  1. #1

    Thread Starter
    New Member
    Join Date
    Jul 2008
    Posts
    4

    Insert Statement

    Hello all,

    How do I use an SQL statement to insert into a recordset?

    Currently I have this:
    Code:
            sql = "INSERT INTO AB (catalog, user1) SELECT (BA.catalog, BA.user1) from BA;"
            
            Set rs = db.OpenRecordset(sql)
    what I need to know is how do I replace the AB part in the insert statement to indicate that I want to add the data to the rs recordset?
    Hopefully this makes sense?

    Thanks

  2. #2
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: Insert Statement

    You don't use a recordset object for an INSERT.

    You use the Execute method of your connection object.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width