
Detailed reference of prototypes, properties and methods available in the
Javascript environment of your Helma web applications.
Object | +--dbConnection
See:
| SUMMARY: Constructor | Properties | Methods | DETAIL: Constructor | Properties | Methods |
| Constructor Summary | |
dbConnection(Object)
A DatabaseObject represents a connection to a relational database and is created using the global getDBConnection function. |
|
| Methods Summary | |
Number
|
executeCommand(<String> sqlString)
Used to implement INSERT, UPDATE, ddl statements and other non value returning statements. |
dbRowset
|
executeRetrieval(<String> sqlString)
Used to implement SELECT and other value returning statements. |
Object
|
getLastError()
Return the last error which occured when connecting or executing a statement, undefined if none. |
void
|
getMetaData()
Return the meta data attached to the connection. |
| Constructor Detail |
dbConnection(Object)
var dbConnection = getDBConnection("db_source_name");
var dbRowset = dbConnection.executeRetrieval("select title from dummy");
while (dbRowset.next())
res.writeln(dbRowset.getColumnItem("title"));
var deletedRows = dbConnection.executeCommand("delete from foobar");
if(deletedRows){
res.writeln(deletedRows + " rows successfully deleted");
}
| Method Detail |
Number executeCommand(<String> sqlString)
sqlString - as String
dbRowset executeRetrieval(<String> sqlString)
sqlString - as String
Object getLastError()
void getMetaData()
| SUMMARY: Constructor | Properties | Methods | DETAIL: Constructor | Properties | Methods |