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

db.delete

 
 

Library: Interfaces, Database access (OMDB)
Import: omdb.xmd

Declaration

  define external function db.delete
   from  value    db.table  table
   where value    stream   condition

Argument definitions

table
is an open db.table object.
condition
is a condition to limit the number of rows deleted.


Purpose

Use db.delete to delete records from a table using the supplied criteria.

Requirements

The condition must be

Usage Notes

None.

Example

The following example uses db.delete to remove grade references for students who did not finish a course. The deletion is performed through the db.table OMX component.

  import "omdb.xmd" prefixed by db.

  process
      local db.database this-db
      local db.table student-course

      ;  create the database OMX objects
      set this-db to db.open-odbc 'dbDemo'
      set student-course to db.open-table in this-db named 'StudentCourse'

      ;  drop students who did not finish from course lists
      db.delete from student-course where "Grade is null"

      ;  catch the database exceptions
      catch #external-exception identity catch-id message catch-msg
          output 'An error occurred while accessing an omdb function.%n'
          output '%g(catch-id)  :  %g(catch-msg)%n'

    Related Syntax
   db.database
   db.open-table
   dbTableClose
   db.insert
   db.update
   db.table
   db.commit
   db.set-transaction-type
   db.rollback
 
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:02 pm
If you have any comments about this section of the documentation, send email to [email protected]

Copyright © Stilo Corporation, 1988-2005.