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

db.open-oci8i

 
 

Library: Interfaces, Database access (OMDB)
Import: omdb.xmd
Return type: dbDatabase
Returns: 

A db.database object for the opened database connection.


Declaration

  define external db.database function db.open-oci8i
            value stream database_name

  or

  define external db.database function db.open-oci8i
            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 db.open-oci8i to create a connection to an Oracle 8i (or higher) database. The function returns a db.database OMX component.

Requirements

You must have an Oracle 8i (or higher) client installed on your machine, with SQL*NET configured to locate your Oracle 8i (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 db.database 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 8i (or higher) database named "DatabaseDemo" via OCI using username "charley" and password "chaplin". This connection can be reused in other OMDB functions.

  import "omdb.xmd" prefixed by db.

  process
     local db.database my-database
             .  .  .
     set my-database to db.open-oci8i "DatabaseDemo" user "charley" password "chaplin"

    Related Syntax
   db.open-odbc
   db.close
   db.execute-in
   db.query
   db.database
   db.open-table
   db.table
   db.open-procedure
   db.procedure
   db.commit
   db.set-transaction-type
   db.rollback
   db.compile-statement
   db.statement
   db.open-oci8
 
Related Concepts
   Using the OMDB library
 
Other Library Functions
   db.advance-recordset
   db.close
   db.commit
   db.compile-statement
   db.database
   db.delete
   db.discard
   db.execute
   db.execute-in
   db.field
   db.insert
   db.move-record
   db.omdb-version
   db.omdb-version-oci8
   db.omdb-version-oci8i
   db.omdb-version-odbc
   db.open-oci8
   db.open-oci8i
   db.open-odbc
   db.open-procedure
   db.open-table
   db.prepare
   db.procedure
   db.query
   db.reader
   db.record-exists
   db.rollback
   db.set-transaction-type
   db.statement
   db.streaming-execute
   db.table
   db.update
   db.writer
 
 

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

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

Copyright © Stilo Corporation, 1988-2005.