C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Reviews   Communities   Interview   Jobs   Projects   Training   Your Ad Here    
Silverlight Games | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Polls | Revenue Sharing | Lobby | Gift Shop |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...






Forums » .NET » Windows »

Connection string for the database


Posted Date: 01 Nov 2009      Posted By: satheesh      Member Level: Silver     Points: 1   Responses: 5



Hi all,

Can u send me the connection string for the ms access database which i have that in the root folder of the C# windows application...





Responses

Author: Shiva SaiRam    02 Nov 2009Member Level: DiamondRating: 2 out of 52 out of 5     Points: 2

Hai,
We can find connection strings for different data sources here:
http://www.connectionstrings.com/



Author: Christopher    02 Nov 2009Member Level: GoldRating: 2 out of 52 out of 5     Points: 2

Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\DataBase\mydatabase.mdb;Jet OLEDB:Database Password=MyDbPassword;


Author: Abhisek Panda    02 Nov 2009Member Level: GoldRating: 2 out of 52 out of 5     Points: 2

You can use the following code

this.con = new OleDbConnection();
//passing the database path and provider name
this.con.ConnectionString = "Data Source =d:\\Student.mdb;Provider = Microsoft.Jet.Oledb4.0";

Thanks And Regards,
Abhisek Panda
Be Happy And Make Others Happy.
Go Green and Save Your Future.



Author: Anil Kumar Pandey    02 Nov 2009Member Level: DiamondRating: 2 out of 52 out of 5     Points: 2


Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\mydatabase.mdb;Jet OLEDB:Database Password=MyDbPassword;


Thanks & Regards
Anil Kumar Pandey



Author: Dharmaraj    02 Nov 2009Member Level: DiamondRating: 2 out of 52 out of 5     Points: 2

Hi,

Provider=Microsoft.Jet.OleDb.4.0;Data Source=c:\\test.mdb


Regards,
Dharma
Editor,Mentor,MVM
Try and fail but don't fail and try
Me and DNS



Post Reply
You must Sign In to post a response.
Next : to open both the .xls & .xlsx files.
Previous : Declare global objects in winapplication
Return to Discussion Forum
Post New Message
Category: Windows

Related Messages



dotNet Slackers

About Us    Contact Us    Privacy Policy    Terms Of Use