locked
Help! - How can I cast my UDT's from SQL into SQLCe 3.5 RRS feed

  • Question

  •  

    I know SQLCe 3.5 does not support UDT's or CLR but the data on the main SQL database uses UDT's and when Sync services creates the SQLCe 3.5 database these are converted to byte[].

     

    With SQLExpress I would just cast (UDT)sqlDataReader["Field"] and get the desired UDT back but this does not work with 3.5.

     

    Is there a way to use sync services and cast my data back to its original UDT?

     

    Does microsoft have any plans to allow specifing data mapping of binary fields in the final release of sync services?

    • Moved by Max Wang_1983 Friday, April 22, 2011 8:54 PM forum consolidation (From:SyncFx - Microsoft Sync Framework Database Providers [ReadOnly])
    Monday, January 28, 2008 11:38 AM

Answers

  •  

    the UDT mapping is not supported in the sync service current release.

     

    the recommended way to handle this is to modify the selectIncrementalInsert query commandtext to convert your udt type to the desired, SSCE recongnizable type there. i.e.

     

    select <my other columns>, convert ( varbinaryNo, myudttype) from my table where......

     

    Hope this helps.

     

    thanks

    Yunwen

    Friday, February 1, 2008 1:03 AM
    Moderator