Table1.FieldByName('x').DisplayFormat runtime problem.
Hi,
We have a simple problem I hope someone may be able to help with, even if the
answer's 'No you can't!'.
We have a database linked to a TTable component at design time
and wish to assign their field properties at run time.
We do not want to use the fields editor to include their properties
as the database will change when it is used in different scenarios.
We are tring to write to a TFloatField by using the
FieldByName procedure but are having a problem when it comes to
the DisplayFormat property.
with Table1 do
begin
FieldByName('OffsetID').DisplayWidth := 19; {OK}
FieldByName('OffsetID').DisplayFormat := '##.####'; {Error}
end; |
| Error 44:Field identifier expected
We are able to write to the DisplayWidth property with no trouble
but not the DisplayFormat. If we include the field using the
fields editor then we can write to the property as above however we
do not wish to use the fields editor.
I would be grateful if you could please e-mail me with any solutions as well.
Thanks in advance
--
Alan
----
/ o \ Alan Fisher - Leicester - England
| ~ ___ o ~ |
| |\/ .\o | e-mail : a...@fishbowl.foobar.co.uk
| ~ |/\___/ ~ |
\_____________/