473,383 Members | 1,739 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,383 software developers and data experts.

Automation Error Unspecified Error Message

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.
Nov 19 '07 #1
1 3385
Greetings,

I simplified your query by removing parens and the preceding table name
for each field:

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

I also combined your X variable with a Like and * --

WHERE Section Like 'DF*' AND...

What I would do if I were you, starters, is to remove the Where clause
and select like the top 1

SELECT Top 1 Gate, Region, Section, [Charter Fields], " & _
"[Data Value], [Matrix 1 Table], [Matrix 1 Attribute] " & _
"FROM XL_Import"

to make sure that the base query is correct.

If this runs, then the problem is in your Where clause (I am guessing
the X variable). If the base query doesn't work, then you probably
misnamed a field. If so, start out by querying only 1 field, or do a
Select * From XL_Import. If the base query does run, then try out your
Where clause with the Like 'DF*' And...
Rich

*** Sent via Developersdex http://www.developersdex.com ***
Nov 19 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

25
by: Neil Ginsberg | last post by:
I have a strange situation with my Access 2000 database. I have code in the database which has worked fine for years, and now all of a sudden doesn't work fine on one or two of my client's...
12
by: Cheval | last post by:
Has anyone had any problems with inter-office automation between MS Word and MS Access in Office 2003? I have recently installed office 2003 in a new folder and have left the older office 2000...
4
by: RM | last post by:
Had VS .Net 2002 installed on W2k Server SP3 and supported a number of web sites. Installed VS .Net 2003 on Friday and now all web sites using .Net & MS ACCESS get this strange error upon open. ...
1
by: T8 | last post by:
I have a asp.net (framework 1.1) site interfacing against SQL 2000. It runs like a charm 99% of the time but once in a while I get the following "unspecified error". Sometimes it would resolve by...
1
by: Siegfried Heintze | last post by:
I'm using a third party hosting service. I presently have a Web Service on this hosting service's server that loads and executes a native mode DLL. This demonstrates that the hosting service has...
7
by: Jim McGivney | last post by:
ASPX page from VS.net-C# on host's computer using oleDataAdaptor to connect to Microsoft Access database. The page loads, but when connection to the database is attempted to fill a datagrid the...
12
by: Tomas | last post by:
Hi, I have worked with VB.NET for half a year (semi-newbie). Currently I am looking around for some books for those that crossed the starting hurdle. There are too many books out there-make...
1
by: Bruce | last post by:
Hello, I know this must be something simple I'm overlooking but I can't get err.raise inside a class to return anything but 440 - automation error. For example, if I create the following test...
0
by: fniles | last post by:
I am using VB.Net 2003 and MS Access database. Sometimes when I open the database, I got the error "Unspecified error" The application validate users, when it validates users, it reads from a...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.