2022.2

Table Of Contents
Thesyntaxwillbespecifictothedatabase,ormorepreciselytheJDBCconnector.CurrentlyDatamap-
persupportsthefollowingJDBCconnectors:
l
com.mysql.cj.jdbc.Driver
l
sun.jdbc.odbc.JdbcOdbcDriver
l
com.microsoft.sqlserver.jdbc.SQLServerDriver
l
oracle.jdbc.OracleDriver
user
Stringthatrepresentsthenameofthedatabaseuseronwhosebehalftheconnectionisbeingmade.
Thisisusedforauthentication.
password
Stringthatrepresentstheuser'spassword.Thisisusedforauthentication.
Example
Here'sanexampleofhowtoconnecttoamySQLdatabaseandretrieveadatavalue.
con = db.connect('jdbc:mysql://localhost:3306/mycompany','root','admin');
statement = con.createStatement();
values = statement.executeQuery("select * from datavalue");
if (values.next())
values.getString("data");
else
'nothing';
values.close();
statement.close();
con.close();
logger
Globalobjectthatallowsloggingmessagessuchaserror,warningorinformationalmessages.
Methods
Thefollowingtabledescribesthemethodsoftheloggerobject.
Method Parameters Description
error() message:String Logsanerrormessage
info() message:String Logsaninformationalmessage
warn() message:String Logsawarningmessage
record
Thecurrentrecordinthemaindataset.
Page 390