Syncing Non-dbo Schemas RRS feed

  • Question


    We have a database where all the tables are in schemas other than dbo. When we double click on the .sync file in VS those tables do not show up in the sync designer list. How can we sync tables which are not in the dbo schema? Do we have to move them to the dbo schema?


    Bare in mind, I realise that Sql Compact does not support schemas. But, we have gotten around this by changing our select statements to be like this


    [TaskManagement.TaskInfo] - Notice TaskManagement is not a shema; the dot is just part of the name


    rather than


    [TaskManagement].[TaskInfo] on the desktop version of Sql Server.

    • Moved by Max Wang_1983 Friday, April 22, 2011 6:44 PM forum consolidation (From:SyncFx - Microsoft Sync Framework Database Providers [ReadOnly])
    Tuesday, July 29, 2008 4:43 AM


All replies

  • are you using VS SP1 ? this is a known issue in VS RTM and it was fixed in the SP1 already. the below post has details.





    Tuesday, July 29, 2008 4:59 AM
  • We are looking in to it today. How does the mapping between schemas work? The compact version of Sql Server doen't support schemas. Does it just make the target table have a dot in the name?

    Tuesday, July 29, 2008 10:55 PM
  • Yep, Service Pack 1 fixed the problem.


    However, it converts the dot to delimit the schema from the tablename to an underscore. We had to change our data layer because of that. But, it wasn't a big deal. Could be a big deal if you've got your Sql statements hard coded though.



    Friday, August 1, 2008 4:17 AM
  • Christian,


    Agreed that this is less than ideal but Compact does not support the notion of schemas so we are limited in regards to what we can do.  Any feedback on how we might go about improving this experience without schema support in SQL Compact?


    Sean Kelley

    Program Manager





    Friday, August 1, 2008 1:28 PM
  • Hi Sean,

    Actually yes. The designer itself must build the string Schema_TableName somewhere. So why not add a string that can be formatted somewhere in the designer? The user would enter something like:

    "{0}.{1}" or
    "{0}_{1}" or
    "{0}{1} etc


    Schema.TableName or
    Schema_TableName or
    SchemaTablename or whatever

    This would allow for a lot more flexibility and chances are that it would save a lot of people having to change their data layers.

    Saturday, August 2, 2008 6:23 AM