Solved

Deploy DSN ...

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

Expert Comment

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

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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
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 Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…

830 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