Subject | Re: [firebird-support] param length limit |
---|---|
Author | Helen Borrie |
Post date | 2006-01-14T05:55:46Z |
At 05:30 AM 14/01/2006 +0000, you wrote:
when the query is prepared on the server, to be a field of the same size
and type as GNO.
So the only part of this that is strange is why you use LIKE (a wildcard
search) for a test that is offering a search string consisting of the full
12 bytes. All you're doing here is asking for all values that exactly
match or might have one or more characters following the matching
string. The search is invalid, because the column definition precludes the
existence of any values longer than 12. If you intend to pass all 12
characters to the param, use an equality search.
./hb
>Hi,Sure it's a field. It's defined from the metadata returned to the client
>
>I'm using D7+IBX+Firebird 1.5.2
>
>
>This is the SQL in IBQuery1:
>
>select * from grp where gno like :p1
>
>The datatype of gno is varchar(12)
>
>When I assigned '001001001001%' to p1 in application, an error
>raised as:
>
>---------------------------
>Trying to store a string of length 13 into a field that can only
>contain 12.
>---------------------------
>
>It's so strange.
>
>The P1 is not a field, why it is limited to 12 ?
when the query is prepared on the server, to be a field of the same size
and type as GNO.
So the only part of this that is strange is why you use LIKE (a wildcard
search) for a test that is offering a search string consisting of the full
12 bytes. All you're doing here is asking for all values that exactly
match or might have one or more characters following the matching
string. The search is invalid, because the column definition precludes the
existence of any values longer than 12. If you intend to pass all 12
characters to the param, use an equality search.
./hb