Subject | Re: [IBO] Length of string fields in a IBOQuery |
---|---|
Author | patrick_marten |
Post date | 2011-07-14T07:32:30Z |
--- In IBObjects@yahoogroups.com, "Support List" <supportlist@...> wrote:
what details do you need from me?
All the new values are old values * 4.
I did a test with a field with the length of 70 -> varchar(70) in the database and also 70 as the length, which an older IBO version used, when I added that field to a query.
With the build 9 I can type in 70 characters only, which is ok. I did it with cyrillic characters to make sure it's unicode, what I type it.
I then removed that field from the query and added it again. The new length is 70*4=280. I can type in 280 characters now, but once I'm posting the query, I get an error:
ISC ERROR MESSAGE:
arithmetic exception, numeric overflow, or string truncation
So it looks as if the lengths should remain how they were / are in the database.
I hope that helps you,
Patrick
>Hi Jason,
> Patrick,
>
> > I'm testing the latest releases of IBObjects right now, which support
> > unicode.
> >
> > To port my application I took the easiest way and replaced TStringField by
> > TWideStringField in all *.dfm and *.pas files, which worked fine.
> >
> > Today I noticed a difference, though. A difference regarding the size,
> > compared to a field, which I add via a IBOQuery.
> >
> > In the database one of the fields is defined as "varchar (30)". That was
> > also the size with the older release of IBObjects. If I delete this field
> > from the query and add it again with the current release (build 9), the
> > field is being added with a size of 120. A "varchar (50)" with the size
> > 200 etc.
> >
> > Are the new values correct and caused by unicode support or so?
> > Does it mean, that I have to remove and add all string fields via a
> > IBOQuery again, so the previous sizes are set to the new values?
>
> The size you are seeing is the size in bytes.
>
> It is possible there is a problem but I need more details from you to know
> if what you are seeing is a proper indication of bytes or if it should be
> showing the size in characters.
>
> Thanks,
> Jason LeRoy Wharton
> www.ibobjects.com
>
what details do you need from me?
All the new values are old values * 4.
I did a test with a field with the length of 70 -> varchar(70) in the database and also 70 as the length, which an older IBO version used, when I added that field to a query.
With the build 9 I can type in 70 characters only, which is ok. I did it with cyrillic characters to make sure it's unicode, what I type it.
I then removed that field from the query and added it again. The new length is 70*4=280. I can type in 280 characters now, but once I'm posting the query, I get an error:
ISC ERROR MESSAGE:
arithmetic exception, numeric overflow, or string truncation
So it looks as if the lengths should remain how they were / are in the database.
I hope that helps you,
Patrick