set conn=Createobject("ADODB.Connection")
Srvname="Driver={Microsoft ODBC for
Oracle}:Server=DBserver,UID=Sa,Password=sa"
conn.open Srvname
Set Rec = CreateObject("ADODB.Recordset")
SQL="select * from Users"
Rec.open SQL ,conn
Username=Rec.fields("employee name")
Msgbox Username
Microsoft ADO (ActiveX Data Objects) is a Component object
model object for accessing data sources.The ADO Recordset
object is used to hold a set of records from a database
table. A Recordset object consist of records and columns
(fields).
In ADO, this object is the most important and the one used
most often to manipulate data from a database.
Srvname is a connection string.if u already installed
oracle in your system..using that path u can connect oracle
database...if u dont have oracle give the conncetion string
path..whatever connection string created used in database
checkpoint by default...
Example:DSN=QT_Flight32;DBQ=C:\Program
Files\Mercury Interactive\QuickTest
Professional\samples\flight\app\flight32.mdb;
Driver=C:\WINDO
WS\system32\odbcjt32.dll;DriverId=281;FIL=MS
Access;MaxBufferSize=2048;PageTimeout=5;
2nd Method:(Through Self scripting:)
set conn=createobject("adodb.connection")
set rs=createobject("adodb.recordset")
' Oracle client is required to be installed on your box
conn.open= "Provider=OraOLEDB.Oracle.1;Password=***;Persist
Security Info=True;User ID=****;SERVER=****;Data
Source=****;DBQ=****;"
sql="your sql"
rs.open sql,conn
rs.close
set rs=nothing
conn.close
set conn=nothing