By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,917 Members | 1,335 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,917 IT Pros & Developers. It's quick & easy.

Display records from MS Access Database

P: n/a
Hi I am trying to display a few records from MS Access but I keep
getting an error stating:
System.Data.OleDb.OleDbException: The Microsoft Jet database engine
cannot find the input table or query 'MailingList'. Make sure it exists
and that its name is spelled correctly.

I have a database called test.mdb with a table called MailingList,
which contains the following data:

MailinList

MailingListID FirstName LastName WorkPhone EmailAddress
1 Homer Simpson 212K345835 hs******@snp.com
2 Carl Carlson 212K352981 cc******@snp.com
3 Lenny Leonard 212K363284 ll******@snp.com
What I want my query to do is display the first name and last name in
the MailingList table. The query I am using is:

string strSQL = "SELECT MailingList.FirstName, MailingList.LastName
FROM MailingList";

Which should display the first and last names, when I do that it
generates the error I mentioned above. Any idea whats wrong with it I
have been working on this for two days and just need some fresh eyes to
take a look at it. Any help is greatly appreciated.

Thanks,
braheem

Nov 13 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Have you tried pasting it into the SQL view of the QBE in Access?
Then run it from there!

<ba*******@yahoo.com> wrote in message
news:11*********************@g43g2000cwa.googlegro ups.com...
Hi I am trying to display a few records from MS Access but I keep
getting an error stating:
System.Data.OleDb.OleDbException: The Microsoft Jet database engine
cannot find the input table or query 'MailingList'. Make sure it exists
and that its name is spelled correctly.

I have a database called test.mdb with a table called MailingList,
which contains the following data:

MailinList

MailingListID FirstName LastName WorkPhone EmailAddress
1 Homer Simpson 212K345835 hs******@snp.com
2 Carl Carlson 212K352981 cc******@snp.com
3 Lenny Leonard 212K363284 ll******@snp.com
What I want my query to do is display the first name and last name in
the MailingList table. The query I am using is:

string strSQL = "SELECT MailingList.FirstName, MailingList.LastName
FROM MailingList";

Which should display the first and last names, when I do that it
generates the error I mentioned above. Any idea whats wrong with it I
have been working on this for two days and just need some fresh eyes to
take a look at it. Any help is greatly appreciated.

Thanks,
braheem
Nov 13 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.