Devart Oracle ODBC Driver
Overview
The following are the essential steps to install and configure the Devart ODBC Driver for Oracle databsae access.
Usage Examples
Prerequisites
- Download Devart's Oracle ODBC Driver.
Install
Run: DevartODBCOracle.exe
Welcome Next License ⮾ I accept the agreement Select Destination Location Use default (C:\Program Files (x86)\Devart\ODBC\Oracle) Select Components Use default Start menu Folder Use default Devart ODBC Driver for Oracle License Information If you have Activation Key paste it in here otherwise use Trial. Ready to Install [Install] Process runs...you will get a message upon completion.
Configure
Run ODBC Manager C:\Windows\SysWOW64\odbcad32.exe From System DSN tab select [Add] Select: Devart ODBC Driver for Oracle then [Finish] From Devart configuration window set values as so: ⮽ Direct (do this first as it will change interface) Data Source Name: <Enter Descriptive Name> Host: <Enter hostname or IP of System> Service Name: <Database Instance Name> User ID: <Oracle User Account to Use> Password: ******** [Test Connection] From expansion dots (...) grab the connection string. [Copy to Clipboard] [OK]
ADO
'Init Vars dim oConn, oRS dim sConnStr : sConnStr = "DRIVER=Devart ODBC Driver for Oracle; Direct=True;Host=192.168.1.42; Service Name=HR;User ID=scott;Password=tiger" dim sSQL : sSQL = "SELECT count(*) FROM emp;" 'Connect & Open set oConn = CreateObject("ADODB.Connection") oConn.ConnectionString = sConnStr oConn.Open 'Create Recordset & Display Value set oRS = oConn.Execute(sSQL) oRS.MoveFirst msgbox oRS(0) 'Housekeeping oRS.close : set oRS = nothing oConn.close : set oConn = nothing
Put sConnStr on one line.
ADO DSNless
'Init Vars dim oConn, oRS, sSQL dim sUID, sPWD, sDriver, sHost, sSvcName sUID = "UID=scott;" sPWD = "PWD=tiger;" sDriver = "DRIVER=Devart ODBC Driver for Oracle;Direct=True;" sHost = "Host=192.168.1.42;" sSvcName = "Service Name=HR;" sConnStr = sDriver & sHost & sSvcName & sUID & sPWD sSQL = "SELECT count(*) FROM emp;" 'Connect & Open set oConn = CreateObject("ADODB.Connection") oConn.ConnectionString = sConnStr oConn.Open 'Create Recordset & Display Value set oRS = oConn.Execute(sSQL) oRS.MoveFirst msgbox oRS(0) 'Housekeeping oRS.close : set oRS = nothing oConn.close : set oConn = nothing