Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Deploy DSN ...

Posted on 2000-04-14
4
Medium Priority
?
297 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 200 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

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Question has a verified solution.

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

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…
This article describes how to use a set of graphical playing cards to create a Draw Poker game in Excel or VB6.
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…
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…
Suggested Courses

715 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