Click to See Complete Forum and Search --> : Automation Error


January 22nd, 2000, 04:31 AM
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.

Dean
January 24th, 2000, 06:34 AM
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 :)