error in connecting to a dataadapter

Ecialinam

New member
Joined
Jul 27, 2007
Messages
1
Programming Experience
Beginner
Hi, I'm using oledbdataadapter configuration qizard and after clicking on query builder and setting up to finish the configuration, this error was returned.

The Wizard detected the following problems when configuring the data adapter "OleDBDataAdapter1".

Details:
Generated SELECT statement.
IErrorInfo.GetDescription Failed with E_FAIL (0x80004005).

My SELECT statement is like this SELECT * FROM users or SELECT users.* FROM users.

I don't know what seems to be causing this error and how to solve it.

I'm just a beginner in VB.NET so pardon me for my ignorance.

Thanks in advance to anyone who will help.
 
It's because one of your fieldnames has the same name as a System Keyword.

Can you list your fields? The way around it is to use [ ] around the field that is causing the issue, although that would mean you can't use SELECT * FROM Users, instead you'd use something like;

SELECT Forename, Surname, Username, DOB, Address1, [ProblemField], PostCode FROM Users

The only other time I think that error may come up is if you have used spaces in your database column names - if you have then this is a big no no!!!

For example, instead of Post Code, you must use PostCode - it makes life a lot lot lot easier!


EDIT - Examples of System Keywords that NONE of your database columns should really use are;
Session, Section, Zone, Input, Catalog
 
Back
Top