Solved

Deploy DSN ...

Posted on 2000-04-14
4
276 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
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…
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…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

911 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

20 Experts available now in Live!

Get 1:1 Help Now