I receive the error "capability not supported" when I try to create a BDE TTable
that has a ADT
field.
Does not BDE support ADT fields?
The code to reproduce the problem follows
form declaration
object Form14: TForm14
Left = 0
Top = 0
Caption = 'Form14'
ClientHeight = 442
ClientWidth = 628
Color = clBtnFace
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -12
Font.Name = 'Segoe UI'
Font.Style = []
OnCreate = FormCreate
TextHeight = 15
object DBGrid1: TDBGrid
Left = 0
Top = 128
Width = 628
Height = 314
Align = alBottom
DataSource = DataSource1
TabOrder = 0
TitleFont.Charset = DEFAULT_CHARSET
TitleFont.Color = clWindowText
TitleFont.Height = -12
TitleFont.Name = 'Segoe UI'
TitleFont.Style = []
end
object DataSource1: TDataSource
DataSet = Table1
Left = 120
Top = 168
end
object Table1: TTable
FieldDefs = <
item
Name = 'Address'
ChildDefs = <
item
Name = 'City'
DataType = ftString
Size = 20
end
item
Name = 'Road'
DataType = ftString
Size = 20
end
item
Name = 'Number'
DataType = ftString
Size = 5
end>
DataType = ftADT
Size = 3
end>
StoreDefs = True
Left = 128
Top = 72
end
end```
unit Unit141;
interface
uses
Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Data.DB, Bde.DBTables, Vcl.Grids, Vcl.DBGrids;
type
TForm14 = class(TForm)
DataSource1: TDataSource;
DBGrid1: TDBGrid;
Table1: TTable;
procedure FormCreate(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form14: TForm14;
implementation
{$R *.dfm}
procedure TForm14.FormCreate(Sender: TObject);
begin
if not Table1.Exists
then Table1.CreateTable;
Table1.Open;
end;
end.
PS. I try with `ObjectView` TRUE and FALSE
发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745661566a4638867.html
评论列表(0条)