Subject | Re: param length limit |
---|---|
Author | tailuo2002 |
Post date | 2006-01-14T07:26:06Z |
Helen Borrie :
Thanks for your reply.
But, I can execute the sql in IBExpert , how do you explain this?
--- In firebird-support@yahoogroups.com, Helen Borrie <helebor@t...>
wrote:
Thanks for your reply.
But, I can execute the sql in IBExpert , how do you explain this?
--- In firebird-support@yahoogroups.com, Helen Borrie <helebor@t...>
wrote:
>client
> At 05:30 AM 14/01/2006 +0000, you wrote:
> >Hi,
> >
> >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 ?
>
> Sure it's a field. It's defined from the metadata returned to the
> when the query is prepared on the server, to be a field of thesame size
> and type as GNO.wildcard
>
> So the only part of this that is strange is why you use LIKE (a
> search) for a test that is offering a search string consisting ofthe full
> 12 bytes. All you're doing here is asking for all values thatexactly
> match or might have one or more characters following the matchingprecludes the
> string. The search is invalid, because the column definition
> existence of any values longer than 12. If you intend to pass all12
> characters to the param, use an equality search.
>
> ./hb
>