Discussion:
Data Aware Issues
(too old to reply)
Nader el Keilany
2008-02-02 20:04:16 UTC
Permalink
Sorry me once more. - I am the one who bothered all of you with the problems
regarding changes and data aware components. In case that you do not know
(remember) my setup:

I have a very basic issue creating a test application (Delphi 7 - Architect)
to retrieve data and amending it using ib components and data aware
components using a Interbase 2007 database which has been upgraded from a
5.6 Interbase system via back up and restore.

I made sure that I have the latest version of the ibx which helped me with
the main issue that I could not modify data at all.

I was still left with the problem regarding the data aware edit boxes:

I can not just click at the end of the text in the box and start typing but
I have
to highlight the area I want to type new text in first and then type.

I think I know why that is, ie it seems I retrieve the text that is
currently held in the datafield but the ibx components(?) or something else
is then filling up the edit box with additional spaces until the edit box is
"full", ie I can not just click into the "empty" space of the edit box and
type in (because it is already filled up with characters (mind you spaces))
but have to highlight as section and into that section I can now type nex
text.

I checked in the database and there I do only have the actual text and no
trailing spaces (at least so it seems using ibexpert)

My question would be how that happens or better how can I avoid that my
fields get auto-populated with spaces ?

Thanks already for any hints here...

Nader
Zoren Lendry
2008-02-02 21:47:49 UTC
Permalink
Post by Nader el Keilany
I can not just click at the end of the text in the box and start typing but
I have
to highlight the area I want to type new text in first and then type.
I think I know why that is, ie it seems I retrieve the text that is
currently held in the datafield but the ibx components(?) or something else
is then filling up the edit box with additional spaces until the edit box is
"full", ie I can not just click into the "empty" space of the edit box and
type in (because it is already filled up with characters (mind you spaces))
but have to highlight as section and into that section I can now type nex
text.
Aah, I think I finally understand what you were going through! The field
that your TDBEdit represents is probably a CHAR underlyingly, and not a
VARCHAR. So your expectation is that you put the cursor in there and
start typing, and the data starts changing. The reason the data did not
change is because your field was, say, 20 characters in size, and the
size of your data plus trailing spaces was 20. So typing has no effect.
Selecting a block replaces, so it kept you under the 20 limit.

First of, I prefer VARCHAR for just about everything except for very
specialized uses. I use CHAR quite a bit, but always for a very specific
reason.

I'll go check to see if there is a AutoTrim property of a TIBStringField.

Loren sZendre
Zoren Lendry
2008-02-02 21:52:37 UTC
Permalink
Post by Zoren Lendry
I'll go check to see if there is a AutoTrim property of a TIBStringField.
There is a FixedChar property. Try setting that to true for those fields
where you are seeing this behavior (it requires you to use persistent
fields).

Loren sZendre
Nader el Keilany
2008-02-02 21:19:05 UTC
Permalink
Hi there !

I followed your advise and it worked except that I had to set the FixedChar
property to false.

You can not imagine how happy I am right now...

Thanks a lot for all your help. Maybe one day I know enough to help some of
you out as well...well one can always hope...

Thanks again and bye for now

Nader
Post by Zoren Lendry
Post by Zoren Lendry
I'll go check to see if there is a AutoTrim property of a TIBStringField.
There is a FixedChar property. Try setting that to true for those fields
where you are seeing this behavior (it requires you to use persistent
fields).
Loren sZendre
Loading...