• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 683
  • Last Modified:

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

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
Parth48
Asked:
Parth48
2 Solutions
 
Tompa99Commented:
Hi,

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

Best Regarsd Tompa
0
 
DhaestCommented:
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
 
Dhanasekaran SengodanCommented:
0
 
Dhanasekaran SengodanCommented:
0
 
SAMIR BHOGAYTAFreelancer and IT ConsultantCommented:
Hi,  you have to use the following namespace for it.


using System.Data.Oledb;

Then, OledbConnection, OledbCommand, OledbDataSet
0

Featured Post

The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now