Solved

How to use VB script to setup an ODBC on remote PC

Posted on 2004-10-18
6
1,490 Views
Last Modified: 2012-06-27
I have many client computers that I want to setup Microsoft ODBC for Oracle.
It is the System DSN I want to setup.

How can I use a VB script to do that? So that I can distribute the VBS cript to the client PCs and have the ODBC created automatically.

thanks.


0
Comment
Question by:ezlee
6 Comments
 
LVL 33

Accepted Solution

by:
CarlWarner earned 32 total points
ID: 12343960
Are you sure you want to have to do connections with DSN?

You could avoid the hassle by using DSN-less connections to Oracle.

ODBC DSN Less
ODBC Driver for Oracle - from Microsoft
http://www.able-consulting.com/MDAC/ADO/Connection/ODBC_DSNLess.htm#ODBCDriverForOracleFromMicrosoft
0
 
LVL 26

Assisted Solution

by:Alan Warren
Alan Warren earned 31 total points
ID: 12344433
Hi ezlee,

I am all for DSN-Less connections too, but this recently answered question may help you out with your deployment issues.

http://www.experts-exchange.com/Databases/Q_21164337.html

Alan
0
 
LVL 1

Assisted Solution

by:pfinch
pfinch earned 31 total points
ID: 12345643
Or else if you want to stick to DSN:

      Dim myConnStr
      myConnStr = "Provider=OraOLEDB.Oracle.1;Persist Security Info=False;User ID=username;password=password;Data Source=biz"
      set dbConn = Server.CreateObject("ADODB.Connection")
      dbConn.open myConnStr

Regards,
Peter
0
 
LVL 77

Assisted Solution

by:slightwv (䄆 Netminder)
slightwv (䄆 Netminder) earned 31 total points
ID: 12350984
I agree with the DSNless suggestions.

Just wanted to add:  the DSN entries are stored in the registry: HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBC.INI

Just export the DSN entry you want and on the client, apply the .reg file.

Off the top of my head, I don't know how to apply registry enteries with VBS but I'm sure it can be done.
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

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

This article describes some very basic things about SQL Server filegroups.
Shadow IT is coming out of the shadows as more businesses are choosing cloud-based applications. It is now a multi-cloud world for most organizations. Simultaneously, most businesses have yet to consolidate with one cloud provider or define an offic…
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

685 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