Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Creating DataSource name while VB Application Installing

Status
Not open for further replies.

vassoft

Programmer
Jun 12, 2002
18
MY
hai
I need to create Data Source namee through Visual Basic Application.(i.e That DSN sholud create when i am installing the my Visual BasicApplication)

Can any one help me in this.
Thanking u.

Vas
 

To accomplish what you want you will need to alter the setup.exe (it's a project that you can alter). Before altering this project you should make a backup of it.

To create your ODBC DSN you can use the registry API's or create a .reg file and launch it from you setup.

It may be easier for you to write the code and place it in your program than in the setup program. At startup you could use a boolean value to test to see you have run the code before i.e....

Application Start
Use GetSetting To Test IF DSN Code Has Been Run
If GetSetting Return False Then
Run Code To Create DSN
Use SaveSetting To Set Entry For GetSetting To Return Next Time Program Is Run

Run Program

I Hope This Helps, Good Luck

PS. If you are looking for code to create a DSN search this site
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top