p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   Classic ASP Databases (http://p2p.wrox.com/forumdisplay.php?f=62)
-   -   Diplay records from database (http://p2p.wrox.com/showthread.php?t=31286)

braheem July 7th, 2005 11:27 AM

Diplay records from database
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:


MailingListID FirstName LastName WorkPhone EmailAddress
1 Homer Simpson 212K345835 hsimpson@snp.com
2 Carl Carlson 212K352981 ccarlson@snp.com
3 Lenny Leonard 212K363284 lleonard@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.


DaveGerard July 14th, 2005 01:35 AM

If you don't mind, could you just post your complete code for the page?

happygv July 19th, 2005 05:28 PM

Hi braheem,

As you say in your post, the table name seems to be MailinList(g missing). Check if the table name is the same in the mdb file, as what you use in the SELECT query.

- Vijay G
Strive for Perfection

eapsokha July 25th, 2005 10:08 PM

Please ensure the name of table you used inside SQL statement is correct. You may provide the full code.

All times are GMT -4. The time now is 11:08 PM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.