swirl Guide to OmniMark 6   OmniMark home
docs home 
IndexConceptsTasksSyntaxLibrariesOMX VariablesErrors
 
  Related Syntax   Related Concepts   Other Library Functions  
function   dbTableOpen   Available in:
Professional
Enterprise

Library: omdb - high level database access
Include: omdb.xin
Return type: dbTable
Returns:       

A specific table of type dbTable.


Declaration

  define external dbTable function dbTableOpen
         value    dbDatabase  database
   table value    stream      table
  where
database
is a dbDatabase object representing an open database connection.
table
is the name of the table in the database you wish to access.


Purpose

Use dbTableOpen to attach a dbTable OMX item to an existing table in the database.

Requirements

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

  include "omdb.xin"

The database connection represented by database must be:

The table must exist (else external exception OMDB501).

Usage Notes

You may open a table that is already opened. The resulting dbTable object behaves independently, unlike a copy.

Example

This code sample shows two different ways of opening a table. The choice depends on whether you want to reuse the table connection or not.

  include "omdb.xin"

  process
      local dbDatabase this-db
      local dbTable course
      local dbTable course-2
      local stream SQL-insert initial
      {  "insert into Course values " ||
          " ( '503', 'Learning Through Pain'  )"
      }
      local stream course-data variable initial
      {   '504' with key 'cid',
           'What is that Sound?' with key 'CourseName'
      }

      set this-db to dbOpenODBC 'dbDemo'

      set course to dbTableOpen this-db table 'Course'
      dbExecute this-db sql SQL-insert

      dbTableInsert dbTableOpen this-db table 'Course' from course-data

    Related Syntax
   dbDatabase
   dbTableClose
   dbTableInsert
   dbTableUpdate
   dbTableDelete
   dbTable
 
Related Concepts
   Using the OMDB library
 
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 ] [ OMX ] [ ERRORS ]

OmniMark 6.5 Documentation Generated: December 23, 2002 at 6:25:14 pm
If you have any comments about this section of the documentation, send email to [email protected]

Copyright © OmniMark Technologies Corporation, 1988-2002.