daxSupply

C Scripting Language
Reference Manual
Version 4.4.0

<< Back  End  Next >>
 
 
INDEX
Introduction
Installation
Using the CSL executive
Language
Directives
System library
String library
Math library
Regular expression lib.
File library
Database library
   daxCheckCursor
   daxCommit
   daxConnect
   daxDatabase
   daxDisconnect
   daxDispose
   daxDone
   daxFetch
   daxLiteral
   daxParse
   daxRollback
   daxRowsProcessed
   daxSelectColumnName
   daxSelectColumns
   daxSelectColumnSize
   daxSelectColumnType
   daxSimple
   daxSupply
   Sample 1 (toys.csl)
   Sample 2 (portable.csl)
   Sample 3 (unknown.csl)
Async Communication
Registry/Profile handling
Windows control
C API
C++ Class Interface
CSL links
  
daxSupply(
   const cursor,    // db cursor handle
   const& vals[],   // values to supply
  [const nullind])  // null indicators (default = false)

Supplies values for parameter positions in the statement. The number of values supplied in one call is arbitrary, but the total number of values supplied in all calls must correspond to a multiple of the parameters in the statement.

Example:

  var csr = daxParse(link,
               'insert into csltest (ident, descr) '
               'values (#, #30)'
            );
  var x = { 1, 'barbie', 2 };
  var y = { 'ken', 3, 'ferrari' };
  daxSupply(csr, x);
  daxSupply(csr, y);
  daxDone(csr);
  ...
  daxDispose(csr); // if cursor no longer needed

If argument nullind is passed as true, each supplied value is made out of 2 variables, where the first is the value itself and the second is a boolean indicating null values by true state. The size of vals must therefore always be even.

Example:

  var csr = daxParse(link,
               'insert into csltest (ident, descr) '
               'values (#, #30)'
            );
  var x = {
    { 1, false }, {'barbie', false },
    { 2, false }, {'',       true  }
  };
  daxSupply(csr, x, true);
  daxDone(csr);
  ...
  daxDispose(csr); // if cursor no longer needed
  Copyright © IBK Landquart Last revision: 27.05.2002 << Back  Top  Next >>