as

Saturday 18 January 2014

How to create a DSN for microsoft access database?

Hello guys -  Whenever you need to connect to database, we need to provide the connection strings.
I usually prefer creating DSN for the Databases that I want to access and then use that DSN in code. This makes coding look very simple.

You can follow below steps for creating DSN.

  1. Open Control Panel
  2. Click on Administrative tools
  3. Select Data Sources (ODBC)
  4. DSN Configuration window Opens as shown below.

After you get this window, follow below steps.
  1. Select System DSN Tab and click on Add button
  2. You will see below window where you will have to select a database provider.


In this window you have to select provider corresponding to your database. As we want to connect to access database, I have selected "Microsoft access driver".

Next you have to give the name for dsn and browse to the access file and click on Ok


You are done. Now You can access your database from any language using this dsn name.


What do you think on this topic? Please express your opinion through comment below

Sponsored Links

Popular Posts

Comments

ShareThis