You create publications using Sybase Central or the SQL CREATE PUBLICATION statement. In Sybase Central, all publications and articles appear in the Publications folder. This section describes how to create publications in Sybase Central. For information about creating and modifying publications using SQL, see the MobiLink - Client Administration book.
You use the SQL Anywhere plug-in in Sybase Central, not the MobiLink Synchronization plug-in, to work with MobiLink clients and remote databases. The SQL Anywhere plug-in has a MobiLink Synchronization Client folder where you perform all actions related to remote databases.
You must have DBA authority to create or modify publications, MobiLink users, and subscriptions.
To connect to Sybase Central to work with MobiLink Synchronization clients:
Start Sybase Central, select Tools>Connect from the menu bar, select SQL Anywhere from the New Connection dialog box, and click OK.
On the Identification page in the Connect dialog box, enter DBA as the user name and SQL as the password, select the ODBC DataSource Name radio button, browse to select the DSN of the remote database, and click OK.
In the SQL Anywhere plug-in, expand the node for the remote database and open the MobiLink Synchronization Client folder.
The simplest publication you can make is a single article that consists of all rows and columns of one or more tables. The tables must already exist.
To publish one or more entire tables in Sybase Central:
Connect to Sybase Central as described in “Connecting to Sybase Central”.
Open the Publications folder and double-click Add Publication.
Type a name for the new publication and click Next.
On the Tables page, select a table from the list of Matching Tables and click Add.
The table appears in the list of Selected Tables on the right.
Optionally, add more tables. The order of the tables is not important.
Click Finish.
You can create a publication that contains all the rows but only some of the columns of a table.
To publish only some columns in a table in Sybase Central:
Follow the first four steps of the procedure in “Publishing all the rows and columns in a table”.
On the Columns page, double-click the table's icon to expand the list of available columns, select each column you want to publish, and click Add.
The selected columns appear on the right.
Click Finish.
You can create a publication that contains some or all of the columns in a table, but only some of the rows. You do so by writing a search condition that matches only the rows you want to publish.In MobiLink, you can use the WHERE clause to exclude the same set of rows from all subscriptions to a publication. All subscribers to the publication upload any changes to the rows that satisfy the search condition.
To create a publication using a WHERE clause in Sybase Central:
Follow the first four steps of the procedure in “Publishing all the rows and columns in a table”.
On the Where page, select the table and type the search condition in the lower box.
Optionally, you can use the Insert dialog box to help you format the search condition.
Click Finish.
You can add articles to existing publications.
To add articles in Sybase Central:
Connect to Sybase Central and open the MobiLink Synchronization Client folder as described in “Connecting to Sybase Central”.
Open the Publications folder and double-click the name of the publication to which you want to add an article.
Double-click Add Article.
In the Article Creation wizard, select a table and click Next.
If you want only some columns to be synchronized, select the Selected Columns radio button and select the columns.
If you want to add a WHERE clause, click Next and enter the clause.
Click Finish.
You can modify or drop existing publications in Sybase Central by navigating to the location of the publication and selecting Properties or Delete from its pop-up menu. You can modify and remove articles in the same way.
Publications can be modified only by the DBA or the publication's owner. You must have DBA authority to drop a publication. If you drop a publication, all subscriptions to that publication are automatically deleted as well.