How to create connection string



In this article i will tell you how to create connection string for access database.


In the Previous articles i explained how to add membership tables to the existing databasehow to get connection string from web .config filehow to create dynamic xml sitemap in asp.netHow to solve password length minimum 7 non alphanumeric characters required 1How to apply pagination in repeater control using, How to add my website to google  and many more about Asp.Net.

Step 1.

Open Notepad.

Step 2.

And Save it using file name as "string.udl". Make sure its extension is .udl.

Step 3.

Close this File.

Step 4.

Open the file you have just saved.

Step 5.

Go to Provider Tab. And make sure "Microsoft Jet 4.0 OLE DB Provider" is selected. Then Hit Next.

Step 6.

Choose your database. In my case it is "Datable.mdb".

Step 7.

Enter password if it is password protected else leave it blank.

Step 8.

Click on "Test connection" Button to make sure connection is successfully establised with database or not. 

Step 9.

Hit OK Button.

Step 10.

Right Click on "string.udl" file and open it with notepad or any other text editor.

You Can see the full connection string in this file. Use it where-ever you want. Hope you learnt new thing Today.


Give your Valuable Comments.
comments powered by Disqus
Follow me on twitter
About Me
Harpreet Singh
I began programming with C++ when i was 17. Then at the middle of my study .NET came. Then I began to read C# and VB.NET. By the time i learnt SQL and ASP.NET, and developed some websites such as news portals that are active now. Currently i am running my own Software company.
More Articles