Solved

i want to connect MSAccess 2007 database to my DataGridview in C#.net window application ??

Posted on 2011-02-15
5
667 Views
Last Modified: 2012-06-27
My MS access 2007 database is in C:\Data folder named 'Question_Assistant.accdb'

now i want to display the table from this access database to my datagridview ...
i have the coding for the connection but i don't know the connectionstring for MS Access 2007,
please tell me the connection string for that ..
0
Comment
Question by:Parth48
5 Comments
 
LVL 5

Accepted Solution

by:
Tompa99 earned 400 total points
ID: 34904173
Hi,

On this website you get all the connection strings you need.
http://www.connectionstrings.com/

Best Regarsd Tompa
0
 
LVL 53

Expert Comment

by:Dhaest
ID: 34904238
A complete example, with connection and getting the data can be found here:

C# Tutorial - Binding a DataGridView to a Database
http://www.switchonthecode.com/tutorials/csharp-tutorial-binding-a-datagridview-to-a-database

Working with Data—Using the DataGridView
http://en.csharp-online.net/Working_with_Data%E2%80%94Using_the_DataGridView
0
 
LVL 14

Expert Comment

by:Dhanasekaran Sengodan
ID: 34904243
0
 
LVL 14

Expert Comment

by:Dhanasekaran Sengodan
ID: 34904246
0
 
LVL 11

Assisted Solution

by:SAMIR BHOGAYTA
SAMIR BHOGAYTA earned 100 total points
ID: 34904524
Hi,  you have to use the following namespace for it.


using System.Data.Oledb;

Then, OledbConnection, OledbCommand, OledbDataSet
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Entity Framework is a powerful tool to help you interact with the DataBase but still doesn't help much when we have a Stored Procedure that returns more than one resultset. The solution takes some of out-of-the-box thinking; read on!
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

829 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question