CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Guest

    Automation Error

    I am doing a relatively simple SELECT query on an Access table to retrieve some data. VERY BASIC STUFF!

    During the procedure, I use a recordset object with the same name multiple times for mutlipe different queries - I just close then re-open recordset each time I want to use a different SQL string. OK?!

    This works fine for two queries, but the third (identical style) falls over at the "<Recordset>.Open <SQL SELECT statement>, Connection String>, adCursorForwardOnly" line with the error message "Automation Error (next line) Unknown Error."

    I am using ADO 2.0 and Jet 4.0, and have checked and double checked the spelling of all my objects.

    What could be the problem?

    Regards.


  2. #2
    Join Date
    Jan 2000
    Posts
    2

    Re: Automation Error

    I am replying to my own post here for those of you who may be interested in the solution I found.

    The Automation Errror was being caused by me using the VB reserved word "Position" as a field in an Access table. When I used the field name in the SQL string, the Open method would fall over, with the "Automation Error/ Unknown Error" message.

    A simple solution to what seemed to be a baffling problem


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

Featured