HELP with TField 
Author Message
 HELP with TField

I can't create a TField Object at run-time the way I've read in Tips in
delphi CDRom:
var
  s:TStringField;
begin
  Table1.Close;
  s:=TStringField.Create(Self);
  with s do
  begin
    FieldName:='NAME';
    Name:=Table1.Name+FieldName;
    Index:=TAble1.FieldCount;
    DataSet:=Table1;
  end;
  Table1.FieldDefs.Update;
  Table1.Open;
end;
When it tries to read the Table1.Open sentence reports the error: 'Field
'NAME' is not of the expected type.'
Alternately, is there a way to handle the DBGrid component without
TFields? Thanks very much.

Gonzalo Herrero



Tue, 17 Aug 1999 03:00:00 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. Need help on TField convertion

2. HELP!!: Creating TField component at run-time.

3. Size of TFields Help needed

4. HELP : TFIELD.WIDTH PROBLEM

5. Access to TField Objects on the fly

6. Question about TField component.

7. Changing FocusControl control for a TField

8. TFields' DisplayLabel vs DisplayName

9. Need "virtual" TField

10. array into tfield

11. Was a TField object modifed?

12. Constraints, DBGrids and TFields (second attempt)

 

 
Powered by phpBB® Forum Software