Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
1082
SQLCE 3.5 (.sdf) database error...
posted

Hi All,

I am using a SQLCE 3.5 database (.sdf file), but when I save data this error: "sql truncated conversion error".

byte[] appointmentBytes = app.Save();
MyDataRow["AllProperties"] = appointmentBytes;
ERROR: --> MyAppointmentsTableAdapter.Update(this.MyDataSet.Appointments);

Any suggestions?

 

Parents
No Data
Reply
  • 1082
    Offline posted

    Perhaps I found what causes this error ...
    With the SQL Server CE the "AllProprieties" field must not be "varbinary" (2048) but "Image" (16)
    Can someone confirm this?

    MSDN Library: *************
    Supported Data Types and Data Type Mappings for SQL Server 3.5 CE (varbinary)
    If the length of the data is 510 bytes or less, SQL Server CE replication maps the SQL Server varbinary data to SQL Server CE varbinary ; otherwise, it maps it to SQL Server CE image. If the length of the image data exceeds the length of the varbinary column, synchronization fails when the data is sent from the SQL Server CE subscription to the SQL Server publication.
    ******************************

Children
No Data