0

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 Answers1

0

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

ErikEJ
  • 40,951
  • 5
  • 75
  • 115
  • I'll try. I've tried 3.1 and 3.5 but i'll do it again to see if i did something wrong. – jllunell May 07 '12 at 07:58
  • Haven't tried anything yet, but it's strange that without opening the sdf file on the PC when it goes back to the device it can't be used anymore (it can be opened in the device, no exceptions... but strange database behaviour). – jllunell May 07 '12 at 22:49
  • Hi again. Now i have tested all. I've installed 3.1 and 3.5 on device and 3.1 and 3.5 on Desktop, and no help. But i think it's not a library thing, because if i copy and paste the sdf, generated on device, from Device->Desktop->Device it happens the same. (Windows Mobile 5.0 -> Windows 7 x64 -> Windows Mobile 5.0). Can't it be a security issue from Windows 7 that touch the sdf file somewhere? Or a x64 bits issue? A compact Framework issue? I don't know. Anyone can help me with this? Thank you – jllunell May 08 '12 at 07:19
  • What dll version of the compact engine is installed on the device – ErikEJ May 08 '12 at 10:24
  • Finally it works! It was the library, last 3.1 make all work correctly. Had an other problem with internal scanner dlls that made me think it wasn't a SQLServerCE version problem. THank you – jllunell May 08 '12 at 13:26