swirl
Guide to OmniMark 7   OmniMark home
docs home 
IndexConceptsTasksSyntaxLibrariesLegacy LibrariesErrors
 
      Other Library Functions  
function  

dbOpenOCI8

 
 

Library: Database access (OMDB) legacy library
Include: omdb.xin
Return type: dbDatabase
Returns: 

A dbDatabase object for the opened database connection.


Declaration

  define external dbDatabase function dbOpenOCI8
            value stream database-name

  or

  define external dbDatabase function dbOpenOCI8
            value stream database-name
       user value stream user-name
   password value stream password

Argument definitions

database-name
is the name of the Oracle database to which you want to connect.
user-name
is the user name that will be supplied to the database when the connection is made.
password
is the password that will be supplied to the database when the connection is made.


Purpose

Use dbOpenOCI8 to create a connection to an Oracle 8 (or higher) database. The function returns a dbDatabase OMX component.

Requirements

You must include the following line at the beginning of your OmniMark program:

  include "omdb.xin"

You must have an Oracle 8 (or higher) client installed on your machine, with SQL*NET configured to locate your Oracle 8 (or higher) server.

database-name must:

Else external exception OMDB501 is thrown.

user-name and password are optional with default values of an empty string. Check what access requirements are needed for the specified database.

Usage Notes

You must have declared an OMX dbDatabase variable (either global or local) to reuse a database connection in other omdb functions.

This function will throw external exception OMDB501 if there are any OCI errors. The exception will include any error numbers and descriptive text generated by the OCI. Consult your Oracle documentation for further details on the error condition.

Example #1:

Create a connection to an Oracle 8 (or higher) database named "DatabaseDemo" via OCI using username "charley" and password "chaplin". This connection can be reused in other omdb functions.

  include "omdb.xin"

  process
     local dbDatabase my-database
                  .  .  .
     set my-database to dbOpenOCI8 "DatabaseDemo" user "charley" password "chaplin"

        Other Library Functions
   dbClose
   dbCommit
   dbDatabase
   dbExecute
   dbField
   dbFieldPrepare
   dbFieldSink
   dbFieldValue
   dbIsVersionCompatible
   dbLibraryVersion
   dbLibraryVersionOCI8
   dbLibraryVersionOCI8i
   dbLibraryVersionODBC
   dbOpenOCI8
   dbOpenOCI8i
   dbOpenODBC
   dbProcedure
   dbProcedureClose
   dbProcedureExecute
   dbProcedureOpen
   dbQuery
   dbRecordExists
   dbRecordMove
   dbRecordSetMove
   dbRollback
   dbSetTransactionType
   dbStatement
   dbStatementCompile
   dbStatementDiscard
   dbStatementExecute
   dbStatementStreamingExecute
   dbTable
   dbTableClose
   dbTableDelete
   dbTableInsert
   dbTableOpen
   dbTableUpdate
 
 

Top [ INDEX ] [ CONCEPTS ] [ TASKS ] [ SYNTAX ] [ LIBRARIES ] [ LEGACYLIBRARIES ] [ ERRORS ]

OmniMark 7.1.2 Documentation Generated: June 28, 2005 at 5:45:06 pm
If you have any comments about this section of the documentation, send email to [email protected]

Copyright © Stilo Corporation, 1988-2005.