Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Express Edition and Compact Edition (2005)
 LIKE-operator with long strings (over 256 chars)

Author  Topic 

lebedev
Posting Yak Master

126 Posts

Posted - 2007-07-24 : 10:50:50
I am using SQL Server Compact Edition and I get an exception when running a query with a LIKE-operator which parameter is a string with length greater than 256 characters.

Has anybody had this problem? Any ideas on how to fix this?

Thanks.

rmiao
Master Smack Fu Yak Hacker

7266 Posts

Posted - 2007-07-24 : 14:39:38
Do you have error message? What's the query look like?
Go to Top of Page

lebedev
Posting Yak Master

126 Posts

Posted - 2007-07-24 : 15:47:17
System.Data.SqlServerCe.SqlCeException: The string value that has been assigned to the LIKE clause in the SELECT statement exceeds the limit for SQL Server Compact Edition. The limit for single byte character set is 256 characters but can be smaller for double byte character set..

Any ideas how to fix or work around this?
Go to Top of Page

lebedev
Posting Yak Master

126 Posts

Posted - 2007-07-24 : 15:56:15
More information on the error:
http://msdn2.microsoft.com/en-us/library/ms171879.aspx
See error #25129
Go to Top of Page
   

- Advertisement -