473,386 Members | 1,867 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,386 software developers and data experts.

Display records from MS Access 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:

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
1 1861
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
by: MHenry | last post by:
Hi, We were going merrily along for 6 years using this database to record all client checks that came into our office, including information about what the checks were for. Suddenly, network...
2
by: Lin DeNoyer | last post by:
I am so mad at microsoft right now! They just told me - 10 days after I placed my order for an upgrade to Office 2003 Pro - that they canceled the order because the credit card info didn't match...
5
by: Bec | last post by:
I'm in desperate need of your help.. I need to build an access database and have NO idea how to do this.. Not even where to start.. It IS for school, and am not asking anyone to do my...
3
by: Kai Zhang | last post by:
I am trying to display some database records in datagrid using dataset. the records need to be displayed are couple of thousands, but the records in database that the SQL query needs to exam are...
6
by: Bob Alston | last post by:
I am looking for others who have built systems to scan documents, index them and then make them accessible from an Access database. My environment is a nonprofit with about 20-25 case workers who...
2
by: gmccammon | last post by:
I am working on a class assignment where I have to connect to an MS Access database. The perl script is contained in a separate file *.pl I went into Control panel/ODBC/ and selected Microsoft...
10
by: darrel | last post by:
Hi there vb genius... I have a problem, i'am currently doing a program that has a database on it. i'am using access database, my problem is the records on my database table doesnt appear on my...
3
by: nma | last post by:
Hi I want to display list from my database, but output shows this error message "Warning: Invalid argument supplied for foreach() in C:\..\aa.php on line 60" in line 60 at aa.php is this...
2
by: zoeabraham | last post by:
I am Using STRUTS1.4 in NetBeans5.5 IDE Here we have a JSP Page <%@page contentType="text/html"%> <%@page pageEncoding="UTF-8"%> <%@ taglib uri="http://jakarta.apache.org/struts/tags-bean"...
1
by: sanchezl | last post by:
Hi, I am developing a program in visual basic that extracts info from an access database. So far I know how to add records, make a query and count the number of records that that query gives, but...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.