Create schema only on client DB RRS feed

  • Question


    I am sync'ing from SQL Server to SQL Server CE, however some of the tables that I wish to sync are upload-only. As such, I want to create these tables within the client database but do not want to download any data for them.


    So far, the only way that I have found to achieve this is to select ... from ... where 1 = 0 within the SeletIncrementalInserts command - surely, there has to be a better way!


    Any suggestions as to the correct way to do this?




    • Moved by Hengzhe Li Friday, April 22, 2011 7:50 AM (From:SyncFx - Microsoft Sync Framework Database Providers [ReadOnly])
    Saturday, November 15, 2008 7:42 PM

All replies

  • Hi Martin


    I am looking for ways to solve this issue.  I will get back at you within 48 hours.


    Maria del Mar Alvarez Rohena - MSFT

    Tuesday, November 18, 2008 6:21 PM
  • Thanks, I look forward to your findings.

    Tuesday, November 18, 2008 7:39 PM
  • Hi Martin


    You can divide your tables into two different sync scopes.  One for bi-directional sync, and the other for upload-only sync.


    Let me know if this helps


    Maria del Mar Alvarez Rohena - MSFT

    Thursday, November 20, 2008 1:52 AM
  • I do not think you are understanding my question here.


    What I need to do is to create tables in a SQL/CE client database based upon the current table structure on SQL Server.


    I am currently acheiving this by assigning the SelectIncrementalInserts command to a stored procedure that currently returns an empty result using "select * from tablename where 1=0" but I cannot believe that this is the correct way to do this. As such, I am asking if there is a better way.


    The answer you have given me simply allows me to limit the tables that I am synchronising at any given time - also relevant, but not the answer to my question.


    Thanks for your assistance so far and I hope that you will be able to assist me with my enquiry.

    Thursday, November 20, 2008 8:47 PM