Jump to content

How do I connect to Oracle Databases?


JWoodruff
 Share

Recommended Posts

Hello everyone,

I am attempting to connect to an oracle database and am unable to do so. I have created an odbc datasource to my database and am attempting the following code:

$ado = ObjCreate("ADODB.Connection") 

With $ado
    .ConnectionString =("Provider='OraOLEDB.Oracle';Data Source='[DB]';User Id='[USER]';Password='[PASSWORD]';")
    .Open
EndWith

$adors = ObjCreate( "ADODB.RecordSet" )  

With $adors
        .ActiveConnection = $ado
        .CursorLocation = "adUseClient"
        .LockType = "adLockReadOnly"; Set ODBC connection read only
        .Source = "select [VALUE] from [TABLE] where [VALUE] ='[VALUE]'"
        .Open
EndWith

- Woody

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...