Portable your DSN (Data Source Name)

In this article how you can portable your Data Source Name for Windows operating system’s.  Portable means if you run your program which is connected with database through ODBC then you not need to set the Data Source Name for other system you simply need to one click on the registry key which is exerted as following way’s

At first create DSN for your database, if you want help regarding to create DSN then read the article How to create DSN for Access database , And then click on start and click on run and type “regedit” in run window and click OK button. by this Registry Editor window is opened and browse

 Computer> HKEY_CURRENT_USERSoftwareODBCODBC.INI

and select the database which is created in DSN create step, here the list of DSN which is created for database’s.

Right click on the database name and click on “Export” for which you want to extract registry key or for which you want to portable DSN.

and save the registry file.

export reg

This saved registry file is contain DSN for database and when you click on this registry file DSN is automatically create for your database.

Remember that the save database is must in same directory (means that the database in c: directory when create DSN then for other system this database is in same C: directory).