Solved

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

Posted on 2004-10-18
6
1,485 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 76

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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

This article explains all about SQL Server Piecemeal Restore with examples in step by step manner.
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…

707 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