uses + Data.DBXMetaDataNames
procedure TMainForm.Button2Click(Sender: TObject);
var
Cmd: TDBXCommand;
R: TDBXReader;
begin
DBCon.Open;
Cmd := DBCon.DBXConnection.CreateCommand;
Cmd.CommandType := TDBXCommandTypes.DbxMetaData;
Cmd.Text := TDBXMetaDataCommands.GetColumns + ' ' + 'SysFields';
R := Cmd.ExecuteQuery;
while R.Next do
begin
if R.Value[TDBXColumnsColumns.IsAutoIncrement].AsBoolean then
Memo1.Lines.Add(R.Value['ColumnName'].AsString);
end;
R.Free;
Cmd.Free;
end;
dbExpress Framework 很好用啊! 为啥搞个FireDAC?! 哎!