Unspecified Error

Big Boabby

Member
Joined
Apr 29, 2002
Messages
8
Location
Kilmarnock, Scotland
Hi guys,

I am just looking into .net (i usually use VB6). I understand that I need to use a data adapter to link to the database so that I can fill the dataset and bind the controls.

I am trying to connect to an Access XP database. This is a simple test.mdb with a single table(Names) with Key, NameIn and Message as the fields. I place the adapter on the form, and the data adapter configuration wizard starts. I select Jet 4.0 oledb provider and enter the path, click test connection and it succeeds.

Next, I am asked what I want to use to fill the data set, I only have the option of SQL so I click next and, using the query builder, I try a simple SELECT Names.* FROM Names but when I run the query I get an unspecified error.

When I click next I get:

The wizard detected the following problems when configuring the data adapter "OleDbDataAdapter1"

Details:

General SELECT statement

Unspecified Error : E_Fail(0x80004005)

I have tried to look for this in MSDN but so far have not found any helpful tips - can anyone help?
 
Hi,

Thank you for your response. It seems that the error is specific to my database then. The Northwind query ran successfully.

Now then, is this an Access XP problem or is there a setting that I missed during set up, or an additional component I need to install?

I am now completely baffled as to why my first attempt did not work.

Thank you again.
 
I tried your column names on my box and it worked fine with Access XP, but perhaps if you either created a new test table or renamed Key to something else temporarily, maybe it isnt properly bracketing the Key column name (though it did on my box)?
 
I wouldnt name your column "Key". The default SELECT statement is likely the problem, as "SELECT Key, ..." isnt allowed. You can code the SQL manually to use "SELECT [Key], ..." or just rename your column to a non-reserved word.

-nerseus
 
Hi guys and thanks again,

I can confirm that my data adapter brackets the key field properly and even if I chnage the column names, I cannot get the connection. I can, however connect to Northwind and run the query successfully in the query builder.

As for the Access XP problem - im still working on it!

Cheers guys
 
Ok folks,

I have now established a connection by changing the whole database:

Original Config:

DATABASE: Test DB
TABLE: Names
FIELD1: Key
FIELD2: Name
FIELD3: Message


New Config:

DATABASE: Test
TABLE: Testing
FIELD1: KeyIn
FIELD2: NameIn
FIELS3: Message

So whatever the specific problem, it must have been in one(or all!!) of the diferences in the two.

Thanks for your support
 
The changes were:

Database filename from "Test DB" to "Test"
Table name from "Names" to "Testing"
Field1 from "Key" to "KeyIn"
Field2 from "Name" to "NameIn"
Field3 no changes

Hope this helps
 
I think Names might be a reserved word. When I create an access table with the name "Names" and create a query, the default select shows "SELECT * FROM [Names]". It doesnt put brackets on other table names, such as tblNames, when I create queries for them. Note this is all from within Access itself.

Oddly enough, I dont think "Name" is a reserved word.

Id double check against the Access documentation - things like this are best solved early so that you dont have to worry about a similar problem later.

-nerseus
 
Back
Top