Link to home
Start Free TrialLog in
Avatar of ecohouse
ecohouse

asked on

Automation Error, Unspecified Error when opening ado recordset

I'm running a query and get the error in the subject line above.  This
is the query:

strSQL = "SELECT XL_Import.Gate, XL_Import.Region, XL_Import.Section,
XL_Import.[Charter Fields], " & _
         "XL_Import.[Data Value], XL_Import.[Matrix 1 Table],
XL_Import.[Matrix 1 Attribute] " & _
         "FROM XL_Import " & _
         "WHERE (XL_Import.Section = 'DF" & x & "') AND (XL_Import.
[Data Value]<>'0') AND " & _
         "(XL_Import.[Matrix 1 Table]= 'ProductOption') AND (XL_Import.
[Matrix 1 Attribute]     ='package direction');"


If I paste this into an accesss query it runs fine.  Any ideas what is
going on?  I'm using Access 2003.


Avatar of MikeToole
MikeToole
Flag of United Kingdom of Great Britain and Northern Ireland image

The SQL looks OK, can you post the rest of your ADO code?
ASKER CERTIFIED SOLUTION
Avatar of ecohouse
ecohouse

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
The error message is not ambiguous at all. The problem is the automation error is that the ADO recordset can not be created, since the SQL sentence that should be used to build and popullate it IS NOT A VALID SQL sentence and therefore, can not be parsed to get a result, which would be the recordset.
Avatar of ecohouse
ecohouse

ASKER

I was able to solve this problem awhile ago on my own.  See my last comment.
Closed, 100 points refunded.
Vee_Mod
Community Support Moderator
Thanks.