Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.
SQL スクリプトに渡される in/out パラメータの機能を有効にするために、メソッドに渡されます。
public interface InOutString
継承されたメンバーを含む InOutString インタフェースのすべてのメンバー。
getValue メソッド
setValue メソッド
次の Mobile Link システムプロシージャコールは、スクリプトバージョンver1 を同期するときに、modifyUser という Java メソッドを modify_user 接続イベント用のスクリプトとして登録します。
CALL ml_add_java_connection_script( 'ver1', 'modify_user', 'ExamplePackage.ExampleClass.modifyUser' )
次に示すサンプルは、modifyUser という Java メソッドです。このメソッドは、データベースからユーザ 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 メソッド