SunQuest
 
       Database Code
  Home arrow Database Code arrow Page 6 - MobiLink Synchronization Wizard in SQL Any...
ASP Free Forums 
.NET  
ASP  
ASP Code  
ASP.NET  
ASP.NET Code  
BrainDump  
C#  
Code Examples  
Database  
Database Code  
IIS  
Microsoft Access  
MS SQL Server  
Visual Basic.NET  
Windows Scripting  
Windows Security  
XML  
ASP Web Hosting  
ASP.NET Web Hosting 
Dedicated Servers 
Actuate Whitepapers 
Moblin 
Windows Web Hosting
 
IBM® developerWorks 
Sun Developer Network 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
DATABASE CODE

MobiLink Synchronization Wizard in SQL Anywhere 10
By: Jayaram Krishnaswamy
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 5 stars5 stars5 stars5 stars5 stars / 6
    2006-12-13

    Table of Contents:
  • MobiLink Synchronization Wizard in SQL Anywhere 10
  • Creating the data source for the MobiLink synchronization setup
  • MobiLink Synchronization Wizard
  • Data Source for the consolidated database schema
  • Choosing download options
  • Specifying names for Publication and Script version
  • Fine tuning the model using the Sybase Central Management Interface
  • Summary

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT

    Stay one step ahead of the competition. Evaluate and give feedback on some of the hottest web development tools on the market today. Make your opinion heard! Click Here

    MobiLink Synchronization Wizard in SQL Anywhere 10 - Specifying names for Publication and Script version


    (Page 6 of 8 )

    This brings you to the window where you make choices regarding publication and script version. The remote tables that are going to be synchronized are grouped into a publication and the synchronization logic will be assigned a script version. The script version tracks the different synchronization logic you might create in your application for a specific publication. Both of these require names by which they can be called. These can use defaults generated by the wizard as shown. An optional description may also be added as shown in the following picture.

    When you click on the Next button on the above window you will be presented with the following window. At this stage the MobiLink synchronization model Test10Sync is defined. This model may be deployed as is, or it is possible to make further changes. For this tutorial click on the Finish button as it is intended to be deployed as is. An XML file Test10Sync.mslm will be created in the chosen directory containing the details of the model.

    Review of Test10Sync.mlsm file

    The XML content of the file generated by the model shown in the next listing:

     Listing 1:<?xml version='1.0' encoding='UTF-8'?><sync-model filespec-version="1" version-major="10" version-minor="0" version-patch="0" version-build="2465" name="Test10Sync" description="Synchronization Model for Customers10 table in the MS SQL Server 2005's Test10 Database" script-version="Test10Sync" publication="Test10Sync"><auth-settings enabled="false" type="pop3" /><remote factory="sa"><schema><table name="Customers10" owner="dbo" catalog="Test10" type="table"><column name="CustomerID" isprimarykey="true" nullable="false" ordinal="1" category="string" jdbc="nchar" typename="nchar" length="5" /><column name="CompanyName" isprimarykey="false" nullable="false" ordinal="2" category="string" jdbc="nvarchar" typename="nvarchar" length="40" /><column name="ContactName" isprimarykey="false" nullable="true" ordinal="3" category="string" jdbc="nvarchar" typename="nvarchar" length="30" /><column name="ContactTitle" isprimarykey="false" nullable="true" ordinal="4" category="string" jdbc="nvarchar" typename="nvarchar" length="30" /><column name="Address" isprimarykey="false" nullable="true" ordinal="5" category="string" jdbc="nvarchar" typename="nvarchar" length="60" /><column name="City" isprimarykey="false" nullable="true" ordinal="6" category="string" jdbc="nvarchar" typename="nvarchar" length="15" /><column name="Region" isprimarykey="false" nullable="true" ordinal="7" category="string" jdbc="nvarchar" typename="nvarchar" length="15" /><column name="PostalCode" isprimarykey="false" nullable="true" ordinal="8" category="string" jdbc="nvarchar" typename="nvarchar" length="10" /><column name="Country" isprimarykey="false" nullable="true" ordinal="9" category="string" jdbc="nvarchar" typename="nvarchar" length="15" /><column name="Phone" isprimarykey="false" nullable="true" ordinal="10" category="string" jdbc="nvarchar" typename="nvarchar" length="24" /><column name="Fax" isprimarykey="false" nullable="true" ordinal="11" category="string" jdbc="nvarchar" typename="nvarchar" length="24" /></table></schema></remote><consolidated factory="mss"><schema name="consolidatedSchema"><table name="Customers10" owner="dbo" catalog="Test10" type="table"><column name="CustomerID" isprimarykey="true" nullable="false" ordinal="1" category="string" jdbc="nchar" typename="nchar" length="5" /><column name="CompanyName" isprimarykey="false" nullable="false" ordinal="2" category="string" jdbc="nvarchar" typename="nvarchar" length="40" /><column name="ContactName" isprimarykey="false" nullable="true" ordinal="3" category="string" jdbc="nvarchar" typename="nvarchar" length="30" /><column name="ContactTitle" isprimarykey="false" nullable="true" ordinal="4" category="string" jdbc="nvarchar" typename="nvarchar" length="30" /><column name="Address" isprimarykey="false" nullable="true" ordinal="5" category="string" jdbc="nvarchar" typename="nvarchar" length="60" /><column name="City" isprimarykey="false" nullable="true" ordinal="6" category="string" jdbc="nvarchar" typename="nvarchar" length="15" /><column name="Region" isprimarykey="false" nullable="true" ordinal="7" category="string" jdbc="nvarchar" typename="nvarchar" length="15" /><column name="PostalCode" isprimarykey="false" nullable="true" ordinal="8" category="string" jdbc="nvarchar" typename="nvarchar" length="10" /><column name="Country" isprimarykey="false" nullable="true" ordinal="9" category="string" jdbc="nvarchar" typename="nvarchar" length="15" /><column name="Phone" isprimarykey="false" nullable="true" ordinal="10" category="string" jdbc="nvarchar" typename="nvarchar" length="24" /><column name="Fax" isprimarykey="false" nullable="true" ordinal="11" category="string" jdbc="nvarchar" typename="nvarchar" length="24" /><column name="last_modified" isprimarykey="false" nullable="false" ordinal="12" category="other" jdbc="datetime" typename="datetime" /></table></schema></consolidated><notifier-settings enabled="false" isolation-level="0" poll-interval="5m" /><sync-settings conflict-detection="none" conflict-id-column="process_id" conflict-resolution="consolidated" conflict-resolution-new-table="[table]_new" conflict-resolution-old-table="[table]_old" delete-column="deleted" deleted-value="Y" delete-mode="shadow" delete-table-pattern="[table]_del" delete-timestamp-column="last_modified" delete-insert-trigger-pattern="[table]_ins" delete-delete-trigger-pattern="[table]_del" download-deletes="true" download-index-pattern="[table]_ml" download-subset="none" download-timestamp-column="last_modified" download-timestamp-from-shadow-table="false" download-timestamp-table-pattern="[table]_mod" download-timestamp-trigger-pattern-del="[table]_del" download-timestamp-trigger-pattern-ins="[table]_ins" download-timestamp-trigger-pattern-upd="[table]_upd" download-type="timestamp" merge-existing-triggers="false" merge-generated-triggers="true" non-deleted-value="N" remote-ds-join="false" remote-ds-non-join-column="sync_remote" user-ds-join="false" user-ds-non-join-column="sync_user" /><table-mappings><table-mapping remote="Test10.dbo.Customers10" consolidated="Test10.dbo.Customers10" direction="both"><sync-settings conflict-detection="none" conflict-id-column="process_id" conflict-resolution="consolidated" conflict-resolution-new-table="[table]_new" conflict-resolution-old-table="[table]_old" delete-column="deleted" deleted-value="Y" delete-mode="shadow" delete-table-pattern="[table]_del" delete-timestamp-column="last_modified" delete-insert-trigger-pattern="[table]_ins" delete-delete-trigger-pattern="[table]_del" download-deletes="true" download-index-pattern="[table]_ml" download-subset="none" download-timestamp-column="last_modified" download-timestamp-from-shadow-table="false" download-timestamp-table-pattern="[table]_mod" download-timestamp-trigger-pattern-del="[table]_del" download-timestamp-trigger-pattern-ins="[table]_ins" download-timestamp-trigger-pattern-upd="[table]_upd" download-type="timestamp" merge-existing-triggers="false" merge-generated-triggers="true" non-deleted-value="N" remote-ds-join="false" remote-ds-non-join-column="sync_remote" user-ds-join="false" user-ds-non-join-column="sync_user" /><column-mapping remote="CustomerID" consolidated="CustomerID" /><column-mapping remote="CompanyName" consolidated="CompanyName" /><column-mapping remote="ContactName" consolidated="ContactName" /><column-mapping remote="ContactTitle" consolidated="ContactTitle" /><column-mapping remote="Address" consolidated="Address" /><column-mapping remote="City" consolidated="City" /><column-mapping remote="Region" consolidated="Region" /><column-mapping remote="PostalCode" consolidated="PostalCode" /><column-mapping remote="Country" consolidated="Country" /><column-mapping remote="Phone" consolidated="Phone" /><column-mapping remote="Fax" consolidated="Fax" /></table-mapping></table-mappings><events template-checksum="1289762775"><connection-event id="begin_connection"><generated-script type="SQL" error="false">SET NOCOUNT ON </generated-script></connection-event><connection-event id="authenticate_user" /><connection-event id="end_publication" /><table-event id="download_cursor" table="Test10.dbo.Customers10"><generated-script type="SQL" error="false">SELECT "dbo"."Customers10"."CustomerID", "dbo"."Customers10"."CompanyName", "dbo"."Customers10"."ContactName", "dbo"."Customers10"."ContactTitle", "dbo"."Customers10"."Address", "dbo"."Customers10"."City", "dbo"."Customers10"."Region", "dbo"."Customers10"."PostalCode", "dbo"."Customers10"."Country", "dbo"."Customers10"."Phone", "dbo"."Customers10"."Fax" FROM "dbo"."Customers10" WHERE "dbo"."Customers10"."last_modified" >= {ml s.last_table_download} </generated-script></table-event><table-event id="upload_insert" table="Test10.dbo.Customers10"><generated-script type="SQL" error="false">/* Insert the row into the consolidated database. */ INSERT INTO "dbo"."Customers10" ( "CustomerID", "CompanyName", "ContactName", "ContactTitle", "Address", "City", "Region", "PostalCode", "Country", "Phone", "Fax" ) VALUES ( {ml r."CustomerID"}, {ml r."CompanyName"}, {ml r."ContactName"}, {ml r."ContactTitle"}, {ml r."Address"}, {ml r."City"}, {ml r."Region"}, {ml r."PostalCode"}, {ml r."Country"}, {ml r."Phone"}, {ml r."Fax"} ) </generated-script></table-event><table-event id="upload_delete" table="Test10.dbo.Customers10"><generated-script type="SQL" error="false">/* Delete the row from the consolidated database. */ DELETE FROM "dbo"."Customers10" WHERE "CustomerID" = {ml r."CustomerID"} </generated-script></table-event><table-event id="upload_update" table="Test10.dbo.Customers10"><generated-script type="SQL" error="false">/* Update the row in the consolidated database. */ UPDATE "dbo"."Customers10" SET "CompanyName" = {ml r."CompanyName"}, "ContactName" = {ml r."ContactName"}, "ContactTitle" = {ml r."ContactTitle"}, "Address" = {ml r."Address"}, "City" = {ml r."City"}, "Region" = {ml r."Region"}, "PostalCode" = {ml r."PostalCode"}, "Country" = {ml r."Country"}, "Phone" = {ml r."Phone"}, "Fax" = {ml r."Fax"} WHERE "CustomerID" = {ml r."CustomerID"} </generated-script></table-event><table-event id="upload_fetch_column_conflict" table="Test10.dbo.Customers10" /><table-event id="upload_old_row_insert" table="Test10.dbo.Customers10" /><table-event id="download_delete_cursor" table="Test10.dbo.Customers10"><generated-script type="SQL" error="false">SELECT "Customers10_del"."CustomerID" FROM "Customers10_del" WHERE "Customers10_del"."last_modified" >= {ml s.last_table_download} </generated-script></table-event><table-event id="upload_fetch" table="Test10.dbo.Customers10" /><table-event id="upload_new_row_insert" table="Test10.dbo.Customers10" /><table-event id="resolve_conflict" table="Test10.dbo.Customers10" /></events><consolidated-connection-info><connection-info classname="com.sybase.asa.logon.GenericConnectionInfo" data="UID=sa;DSN=Dev10" /></consolidated-connection-info></sync-model>

     

    More Database Code Articles
    More By Jayaram Krishnaswamy


       · Mobile device management is expected to grow very fast in the coming years and...
     

    DATABASE CODE ARTICLES

    - Deployment of the MobiLink Synchronization M...
    - MobiLink Synchronization Wizard in SQL Anywh...
    - Finding Matching Records in Data Access Pages
    - Using the AccessDataSource Control in VS 2005
    - A Closer Look at ADO.NET: The Command Object
    - A Closer Look at ADO.NET: The Connection Obj...
    - Using ADO to Communicate with the Database, ...
    - Code Snippets: Counting Records
    - Constraints In Microsoft SQL Server 2000
    - Multilingual entries into a DB and to be dis...
    - Getting A List of Tables From SQL Server
    - SQL Server Database Creator - .NET Version
    - ADO Recordset Paging
    - Two combos, one textbox example
    - Discussion & Listserv Module by Mike Eck...




    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway