最新消息:Welcome to the puzzle paradise for programmers! Here, a well-designed puzzle awaits you. From code logic puzzles to algorithmic challenges, each level is closely centered on the programmer's expertise and skills. Whether you're a novice programmer or an experienced tech guru, you'll find your own challenges on this site. In the process of solving puzzles, you can not only exercise your thinking skills, but also deepen your understanding and application of programming knowledge. Come to start this puzzle journey full of wisdom and challenges, with many programmers to compete with each other and show your programming wisdom! Translated with DeepL.com (free version)

Error "Capability not supported" trying to create BDE.TTable with ADT field in Delphi 11 - Stack Overflow

matteradmin7PV0评论

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 
Post a comment

comment list (0)

  1. No comments so far