Solved

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

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

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Cassandra Select Query 1 77
Trouble connecting to SqlServer database 4 62
insert image with its metadata into SQL server Database 3 110
dbcc checkdb datawarehouse 2 55
Creating and Managing Databases with phpMyAdmin in cPanel.
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…

777 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