In this lesson, you register the MobiLinkAuth authenticateUser method for the authenticate_user synchronization event. You add this script to CustDB, the MobiLink sample database.
SQL Anywhere ships with a SQL Anywhere sample database (CustDB) that is already set up for synchronization. The CustDB ULCustomer table, for example, is a synchronized table supporting a variety of table-level scripts.
CustDB is designed to be a consolidated database server for both UltraLite and SQL Anywhere clients. The CustDB database has a DSN called SQL Anywhere 11 CustDB.
To register the authenticateUser method for the authenticate_user event
Connect to the sample database using Interactive SQL.
Run the following command:
dbisql -c "dsn=SQL Anywhere 11 CustDB" |
Use the ml_add_java_connection_script or ml_add_dnet_connection_script stored procedure to register the authenticateUser method for the authenticate_user event.
For Java, execute the following command in Interactive SQL:
call ml_add_java_connection_script( 'custdb 11.0', 'authenticate_user', 'MobiLinkAuth.authenticateUser'); commit; |
For .NET, execute the following command in Interactive SQL:
call ml_add_dnet_connection_script( 'custdb 11.0', 'authenticate_user', 'MobiLinkAuth.authenticateUser'); commit; |
In the next lesson, you start the MobiLink server and load your class file or assembly.
For general information about adding and deleting synchronization scripts, see Adding and deleting scripts.
For more information about the ml_add_java_connection_script, see ml_add_java_connection_script system procedure.
For more information about the ml_add_dnet_connection_script, see ml_add_dnet_connection_script system procedure.
Send feedback about this page via email or DocCommentXchange | Copyright © 2008, iAnywhere Solutions, Inc. - SQL Anywhere 11.0.0 |