Click here to Skip to main content
15,888,802 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
I have windows application to synchronize Sql CE database data of a windows mobile application. I got few issues on synchronization of mobile connected to windows 7 32bit PC.

On synchronization, windows application will copy Sql CE databse from Mobile Device to the PC and do synchronization of data with locally coppied database then copy back to the Mobile Device. If the PC which done synchronization is a windows 7 32Bit then I'll get following issues in Windows Mobile Application when working with synchronized database.

If there is a table with nVarChar column and do search query on that column, No data will return if search condition contain numerals with single quotes to indicate value as a string (In following example strProductID is a nVarchar column)

eg:-
SQL
SELECT * FROM Products WHERE strProductID='2345'


But numerals without quotes or alpha with quotes will works fine

eg:-
SQL
SELECT * FROM Products WHERE strProductID=2345


or
SQL
SELECT * FROM Products WHERE strProductID='asdasd'
Posted
Updated 16-Apr-13 21:46pm
v6

1 solution

Try this
SQL
SELECT * FROM Products WHERE strProductID = N'2345'

Happy Coding!
:)
 
Share this answer
 
Comments
milinda saranga 17-Apr-13 3:38am    
I have a mobile application which already diployed and it works fine on synchronization of mobile connected with XP or Windows 7 64bit PC but only with Windows 7 32bit i will get this issue. I need to find is there any solution without doing changes to application code such as changing configurations of the windows environment wich done synchronization or any such solution.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900