locked
Table *** could not be created. How to see the inner exception RRS feed

  • Question

  • I'm adding a LocalDataCache.sync file to my project, to try to sync SQL Server 2008 DB with SQL Server CE 3.5 on the local machine. With most of the table I don't have problems but some of the tables throw this error "Synchronizing the database failed with this message:" Table ******* could not be created. The generated script is: " ....................". Check the inner exception for more details. How to check this inner exception ?
    Wednesday, January 12, 2011 1:31 PM

Answers

  • most likely those tables don't have a primary key or have a PK but is not clustered index with it. can you check these ?

    I think you could get the inner exception by calling the synchronize() method from the localdatacacheAgent and catch the exceptions.

     

    thanks

    Yunwen


    This posting is provided "AS IS" with no warranties, and confers no rights.
    • Marked as answer by Yunwen Bai Tuesday, January 18, 2011 10:31 AM
    • Unmarked as answer by Yunwen Bai Tuesday, January 18, 2011 10:31 AM
    • Marked as answer by Yunwen Bai Wednesday, January 19, 2011 8:04 PM
    Tuesday, January 18, 2011 10:30 AM

All replies

  • most likely those tables don't have a primary key or have a PK but is not clustered index with it. can you check these ?

    I think you could get the inner exception by calling the synchronize() method from the localdatacacheAgent and catch the exceptions.

     

    thanks

    Yunwen


    This posting is provided "AS IS" with no warranties, and confers no rights.
    • Marked as answer by Yunwen Bai Tuesday, January 18, 2011 10:31 AM
    • Unmarked as answer by Yunwen Bai Tuesday, January 18, 2011 10:31 AM
    • Marked as answer by Yunwen Bai Wednesday, January 19, 2011 8:04 PM
    Tuesday, January 18, 2011 10:30 AM
  • I had the same situation, but the primary key on the problematic table was already clustered. But my key field was of type smallint. I changed it to int, and this resolved the problem.

    Saturday, January 29, 2011 4:21 PM