public ianywhere.ml.script.InOutStringPassed into methods to enable the functionality of an in/out parameter passed to a SQL script.
All members of ianywhere.ml.script.InOutString, including all inherited members.
The following call to a MobiLink system procedure registers a Java method called modifyUser as the script for the modify_user connection event when synchronizing the script version ver1.
CALL ml_add_java_connection_script(
'ver1',
'modify_user',
'ExamplePackage.ExampleClass.modifyUser'
) |
The following is the sample Java method modifyUser. It gets the user ID from the database and then uses it to set the user name.
public String modifyUser(InOutString io_user_name) throws SQLException {
Statement uid_select = curConn.createStatement();
ResultSet uid_result = uid_select.executeQuery(
"SELECT rep_id FROM SalesRep WHERE name = '"
+ io_user_name.getValue() + "' "
);
uid_result.next();
io_user_name.setValue(java.lang.Integer.toString(uid_result.getInt(1));
uid_result.close();
uid_select.close();
return (null);
} |
getValue method
setValue method
| Discuss this page in DocCommentXchange. Send feedback about this page using email. |
Copyright © 2009, iAnywhere Solutions, Inc. - SQL Anywhere 11.0.1 |