Specifications
Executing SQL statements
Executes the specified SQL statement on the associated data source,
and stores the results.
execute( sql : String )
: Boolean
Returns the value of isOK() after performing the operation.
Returns a list of table names. The list includes all tables of the specified
type in the data source. The table type must be specified in all
tables ( table-type :
String ) : String
upper-case, and multiple types must be comma-separated (for example:
“TABLE, VIEW”). If the argument is missing, null or empty, information
is retrieved about all tables in the data source.
Some databases support the "SHOW TABLES" query to retrieve more
details about tables as a regular result set. After passing this query to
the database with the execute() function, the result set contains a
column with the table names and further columns with addiitonal
information on each table.
Returns a list of column names, including all columns in the specified
table.
columns ( table-name
: String ) : String
Some databases support the "SHOW COLUMNS FROM <table-name>"
query to retrieve more details about columns in a table as a regular
result set. After passing this query to the database with the execute()
function, the result set contains a column with the column names and
further columns with addiitonal information on each column.
Getting information about the result set
Returns the number of rows affected by an UPDATE, INSERT, or
DELETE statement.
getRowCount( ) : Number
For some data sources, this function returns the number of rows
returned by a SELECT statement. However, many data sources
cannot provide this information before fetching the rows. If the
function is unable to provide the information, it returns -1.
Returns the number of columns in the result set, or -1 if an error
occurred (or if there is no result set)
getNumColumns( ) : Number
Returns the name of the specified column (as a one-based
index), or the empty string if the name can’t be determined.
getColumnName ( column :
Number ) : String
Returns the data type of the specified column (one-based index
or column name) as one of these strings:
getColumnDataType ( column
: Number or String ) : String
• INTEGER: integer numeric value or single-bit binary value
(Boolean)
• REAL: floating point or fixed point numeric value
• DATETIME: date or time or a combination thereof
• STRING: character string in a known encoding (so that it can
be converted to Unicode)
442
Enfocus Switch 10