admin管理员组文章数量:1026989
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
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
版权声明:本文标题:Error "Capability not supported" trying to create BDE.TTable with ADT field in Delphi 11 - Stack Overflow 内容由热心网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://it.en369.cn/questions/1745661565a2161921.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论