次の方法で共有


Demo V: OfflineApplication – Oracle Backend

One of the design goals of Sync Services framework is to enable heterogeneous database in the backend. That explains the open design of the DbServerSyncProvider class. If you haven’t noticed already all the commands supplied to the provider and SyncAdapters are or type DbCommand which means you can pass any of ADO.NET command type (SqlCommand, OracleCommand, OdbcCommand, OleDbCommand and any vendor implementation too).

To show you this in action, I wrote a simple demo application. Unlike previous demos, I am only showing download only scenario for one table which is 'orders'. However, all the features and techniques demonstrated in previous demos against SQL Server as backend can be easily implemented with Oracle as backend. I assume you have an oracle database somewhere to test against.

One important take away from this demo is the need tell the SqlCe database on the client how to map Oracle specific data types to those of SqlCe. You will also notice that I did not add triggers nor I did add as many metadata columns as in previous demos. That’s because I am downloading changes only and not uploading anything to the server.

I’ve a dedicated page for this demo on my website. There you can download the demo project and experiment with it.

Feedback: Visit Sync Services Forum

 

Update: Just to let you know, I left Microsoft to start a new company, Raveable Hotel Reviews. See examples: Romantic Hotels in NYC , Best Hotels in Seattle , Top 10 Hotels in Myrtle Beach , Kid Friendly Hotels in Chicago , Hotels with in-room jacuzziand Best Hotels in Miami. Your feedback is welcome on twitter.com/raveable, raveable blog.

Comments

  • Anonymous
    March 15, 2007
    On this demo, you talk about a file "demo.sql", that doesn't exist. Can you "update" the demo? Or just send me the script to create the database. Thank's.

  • Anonymous
    March 15, 2007
    There is no need for demo.sql file since the UI has two buttons to createdelete the table for you. I need to remove the reference to demo.sql from the readmedocs. Thanks

  • Anonymous
    March 15, 2007
    Rafik, hi (again). Well, I downloaded the Oragle Express Edition, compile the application and run. An a error shows up, about "sqleceme30.dll", so I just remove and add the Reference, and works, I synchronize whit client and works too. But, this is not the point. The point is, when I click on button "Make Random Updates", on server the update occurs, but NOT on the client. Could you investigate that? Great, and thank's again.

  • Anonymous
    March 15, 2007
    This is a download only demo. That said, I intentionally disabled the changes on the client since it would be uploaded to the server. My intention from this demo is to show you that you can synchronize with Oracle with the same ease as with SQL Server. Now you can extend the demo to do the upload scenario if you which would be similar to old demos. You just need to write the commands that work with Oracle instead.

  • Anonymous
    August 10, 2010
    Do you know of any third-party Oracle providers that will wok with the Sync Framework?  This example uses the classes from System.Data.OracleClient which is a deprecated API.