locked
Possible bug in SqlCeSyncUtil.TableExists RRS feed

  • Question

  • hi there,

    in the last days i encountered a possible bug in the createSchema method of SqlClientSyncProvider.
    Sometimes it throws a SchemaException when trying to synchronize with the remote provider.
    It states that some tables are not available, but they definitely Are.
    The point is that the tables are access via nhibernate from another thread, although i can confirm
    that at the point the sync is started nothing is read or written from or to the database.


    the SqlCeSyncUtils's TableExists class checks for a given table with a select statement from the
    INFORMATION_SCHEMA.TABLES View. Executing the same statement from within SSMS08
    returns exactly what the statement in TableExists wants but fails within the same method.

    It is kinda strange that the Synchronization process works at first and after calling another
    method of the same webservice (i sync via wcf), SqlCeSyncUtil is not able to find the first
    table from my local syncadapters).
    my syncadapters all have UseExistingTableOrFail as TableCreateOption and i know that i'm 
    not dropping tables during runtime. when i exit and restart sync framework works again as
    expected. 

    Are there any concurrency problems when using sync framework together with open nhibernate
    sessions? maybe some kind of race condition? or is there some issue with sql ce?
    as the tables definitely exist and TableExists from SqlCeSyncUtil returns false, i guess there
    may be some problem when using the shared SqlCeCommand or maybe because the
    SqlCeClientSyncprovider reuses old transactions. i have no clue.

    any ideas where to start? reflector didn't made me wiser 
    thanks
    j.
    • Moved by Max Wang_1983 Thursday, April 21, 2011 6:07 PM forum consolidation (From:SyncFx - Technical Discussion [ReadOnly])
    Monday, October 27, 2008 4:48 PM

Answers