Sunday, May 24, 2009

ExportSqlCE 1.9.2 – bug fix

I noticed this forum post, where the poster reports 2 Sync Framework bugs. I knew I was affected by the last one, as I use the same LIKE clause (LIKE ‘__sys%’) to exclude system columns from the ExportSqlCE generated script. I assumed that this clause would exclude all columns beginning with 2 underscores and the letters “sys” – it does indeed, but the like clause also includes any column names that contain the 3 letters, “sys”, like “IsSystem” and “tbSysConfig”  at postion 3. This is due to the fact that the “_” (underscore) is actually a LIKE wildcard character, as documented here.   :-(   -  A possible solution (which is implemented in version 1.9.2), is the following WHERE statement:

SUBSTRING(COLUMN_NAME, 1,5) <> '__sys'

Go and get version 1.9.2 here.

No comments: