SchemaParameter Object

The SchemaParameter Object is used to hold information about a parameter for a data table or command. This can be accessed through the parameters property on the SchemaDataTable and SchemaCommand objects.

The code snippet below shows how the parameters object can be used:

for (i=0; i<schema.dataTables.count-1; i++)
{
  log('schema.dataTables['+i+'].parameters.count:'+schema.dataTables[i].parameters.count);
  for (j=0; j<schema.dataTables[i].parameters.count; j++)
  {
    log('schema.dataTables['+i+'].parameters['+j+'].name:'+schema.dataTables[i].parameters[j].name);
    log('schema.dataTables['+i+'].parameters['+j+'].description:'+schema.dataTables[i].parameters[j].description);
  }
}

Properties

name

Represents the parameter name. The statements for this table or command will use this in the SQL query.

description

Represents an optional description for the parameter.

dataType

Represents the type of the parameter, this can be one of the following:

Unknown AutoInc Blob Boolean
Byte Cardinal Currency DateTime
Decimal FixedChar FixedWideChar Float
Guid Integer LargeAutoInc LargeInt
LargeUInt Memo SingleFloat ShortInt
SmallInt String WideMemo WideString
Word Xml

size

Represents the optional size for the parameter (for strings). Ignored for all other types.

blobType

Represents the blob type to use for the field (required for oracle). Valid values are:

Unknown Blob Memo
OraBlob OraClob Timestamp

direction

Used to define what kind of parameter this is. Input parameters are passed to the database server, output and result are expected back. Valid values are:

  • Input
  • Output
  • Result