bool executeSqlArray ( array $sqlStatements )
The method executeSqlArray()
executes an array of statements constructed by one of the data dictionary functions such as createTableSql(), dropIndexSql() or addColumnSql().
The statements are executed within the scope of a single transaction.
/* * create a data dictionary object, using the database connection */ $dict = NewDataDictionary($db); $tabname = "LCTABLE"; /* * Change the length of COL1 from 32 chars to 60 */ $flds = " COL1 C(60) NOTNULL DEFAULT 'abc', "; /* * create the SQL statement necessary to modify the column */ $sqlarray = $dict->changeTableSQL($tabname, $flds); /* * This statement actually changes the table */ $db->startTrans(); $dict->executeSqlArray($sqlarray); $db->completeTrans();