Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.
被传递给方法,以使传递给 SQL 脚本的输入/输出参数生效。
public interface InOutString
InOutString 接口的所有成员,包括所有继承的成员。
getValue 方法
setValue 方法
以下对 MobiLink 系统过程的调用在同步脚本版本 [ver1] 时将名为 [modifyUser] 的 Java 方法注册为 [modify_user] 连接事件的脚本:
CALL ml_add_java_connection_script( 'ver1', 'modify_user', 'ExamplePackage.ExampleClass.modifyUser' )
以下是名为 [modifyUser] 的示例 Java 方法。它从数据库获取用户 ID,然后使用该 ID 设置用户名。
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 方法setValue 方法