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
Solved

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

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

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

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.
CCModeler offers a way to enter basic information like entities, attributes and relationships and export them as yEd or erviz diagram. It also can import existing Access or SQL Server tables with relationships.
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…

809 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