+ Reply to Thread
Results 1 to 5 of 5

Problem with VBA/ADO Select Into

  1. #1
    Forum Contributor
    Join Date
    12-26-2010
    Location
    Kansas City, Kansas
    MS-Off Ver
    Excel 2007
    Posts
    147

    Problem with VBA/ADO Select Into

    When I run this routine - I get
    Unexpected error from external database driver (1309)

    Not certain if (a) I can do Select into (b) my sql syntax is wrong or (c) I have
    left something out ....

    Here is code ....

    Please Login or Register  to view this content.
    Thanks for any help with this.

    regards
    JohnM3
    Last edited by JohnM3; 06-16-2011 at 12:13 PM.

  2. #2
    Forum Expert snb's Avatar
    Join Date
    05-09-2010
    Location
    VBA
    MS-Off Ver
    Redhat
    Posts
    5,649

    Re: Problem with VBA/ADO Select Into

    Try:

    Please Login or Register  to view this content.



  3. #3
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    England
    MS-Off Ver
    365, varying versions/builds
    Posts
    21,983

    Re: Problem with VBA/ADO Select Into

    You can't do a SELECT INTO with an open workbook (you shouldn't really use ADO with open workbooks anyway due to memory leaks). If you have an existing sheet with the right headers, you can use an INSERT INTO, or you can use the SELECT INTO if the workbook is closed.
    Everyone who confuses correlation and causation ends up dead.

  4. #4
    Forum Contributor
    Join Date
    12-26-2010
    Location
    Kansas City, Kansas
    MS-Off Ver
    Excel 2007
    Posts
    147

    Re: Problem with VBA/ADO Select Into

    Hi snb

    Please Login or Register  to view this content.

    regards
    JohnM3

  5. #5
    Forum Contributor
    Join Date
    12-26-2010
    Location
    Kansas City, Kansas
    MS-Off Ver
    Excel 2007
    Posts
    147

    Re: Problem with VBA/ADO Select Into

    Hi romperstomper ...

    You can't do a SELECT INTO with an open workbook

    Thanks ,,, I did not know that.

    regards
    JohnM3

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1