[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 681
  • 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

Vote for the Most Valuable Expert

It’s time to recognize experts that go above and beyond with helpful solutions and engagement on site. Choose from the top experts in the Hall of Fame or on the right rail of your favorite topic page. Look for the blue “Nominate” button on their profile to vote.

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