Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Create ODBC in VB

Status
Not open for further replies.

lakers8175

IS-IT--Management
Sep 18, 2001
67
US
Can someone help me please? I need to create an Oracle driver ODBC connection in VB. The plan is to call this function when the connection has not been installed on a PC. When called it will create a system DSN with and Oracle ODBC driver.

Thanks.
 
You need to download the Oracle ODBC driver from first.

Once you have done that run odbccp32.cpl from the command prompt. That gets you over step 1. It is ctrl-tab to go over the tabs

This is from the help in XP
1) Click Start, point to Programs, point to Administrative Tools, and then double-click Data Sources (ODBC).

NOTE: In Windows 2000 Professional, click Start, point to Settings, click Control Panel, double-click Administrative Tools, and then double-click Data Sources (ODBC).
2) Click the System DSN tab.
3) Click Add.
4) Click the database driver that corresponds with the database type to which you are connecting, and then click Finish.
5) Type the data source name. Make sure to you a name that you will remember. You will need to use this name later.
6) Click Select.
7) Click the correct database, and then click OK.
8) Click OK in the next two dialog boxes.
 
I can't remember the exact syntax but the method you're looking for is:

Code:
DBEngine.RegisterDatabase

HTH,

Ed Metcalfe.

Please do not feed the trolls.....
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top