Solved

Deploy DSN ...

Posted on 2000-04-14
4
274 Views
Last Modified: 2008-02-01
I would like to make a DSN part of the setup program using the package and deployment wizard in VB 6.0.  If this can't be done is there another way to deploy this DSN?

(I cannot use a DSN-less connection in the app itself)

Thanks!
0
Comment
Question by:jgaull
  • 2
4 Comments
 
LVL 69

Expert Comment

by:Éric Moreau
ID: 2717212
Look at the RegisterDatabase method of the DBEngine object. It creates DSN on the fly.
0
 
LVL 69

Expert Comment

by:Éric Moreau
ID: 2717219
Before using ADO (DSN less), I used to recreate my DSN at each time I started the application. I was giving parameters in an INI file and recreate it.
0
 
LVL 6

Accepted Solution

by:
hatem72 earned 50 total points
ID: 2718111
This code will check for an existing DSN connection, and if it's not there, it will create it according to your specifications :
http://www.planet-source-code.com/vb/scripts/ShowCode.asp?lngWId=1&txtCodeId=4763

Hope Help ...
0
 

Author Comment

by:jgaull
ID: 2723682
This is exactly what I needed!! Thanks!!
0

Featured Post

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now