Are you specifying the parameter type to be SqlDbType.NVarChar? The peculiar
difference between your two strings is that the first one is an integer that
fits a 64-bit representation, while the second one does not (it exceeds
2^64-1). It looks almost like your strings are getting converted to bigint
somewhere. Also, what exactly is "above error"? I don;t think you included
the error message in your post
--
Alex Feinman
---
Visit
http://www.opennetcf.org
"oren" <(E-Mail Removed)> wrote in message
news:uEiw3$(E-Mail Removed)...
> Hello,
>
> I have a table with a field defined as nvarchar(40).
>
> When I am trying to post a value longer than 20 characters, SQLCE returns
> the abouv error.
>
> When I am using the sample string "12345678901234567890" and it works OK
> (Len=20)
> When I am using the sample string "123456789012345678901" and it works
> Fails
> (Len=21)
>
> I also tried dynamic SQL query and paramaterized query (also trying to
> manually set SqlCeParameter.size=40)).
> Both gave me the same result.
>
> Any idea ?
>
>
>