问题
I've have an application on Windows XP that takes an sdf file (SQLServerCE3.0) from a mobile device (Windows Mobile 5.0) import and delete some data and then put it back to the device. It has allways worked correctly.
Now, when i do it on Windows 7 x64 the sdf file does some strange behaviour on the device when it goes back.
When i do a join with strings, example:
SELECT EMPRESA FROM EMPRESES E INNER JOIN VENDORS V ON V.EMPRESA_GUID = E.GUID where V.GUID='{XXX-XXX}'
It doesn't return anything, when it has data to return (On Windows XP it works correctly).
I've tested it, and only to take the file from device on Windows 7 (with RAPI or manually) and putting it back to the device it can't be used anymore.
I don't know why this is happening, tried changing SQLServerCE version but no help. Can anybody knows what's going on or had same problems before?
I found something similar here: http://www.codeproject.com/Questions/98676/c-app-on-xp-makes-sdf-works-same-exe-on-windows-7
Thank you.
回答1:
You must use the 3.1 engine (3.0.5300 or higher) as documented here: http://blogs.msdn.com/b/sqlservercompact/archive/2009/04/01/after-moving-the-database-from-one-platform-to-other-the-first-sqlceconnection-open-takes-more-time.aspx
来源:https://stackoverflow.com/questions/10478352/sqlserverce-sdf-file-on-windows-7