I have the same problem and I can't find the solution. I have tried with a minimal TClientDataset and it still gives the 'Invalid parameter' error in CreateDataSet. Here is the code:
unit uPruebaTClientDataset;
interface
uses
Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls, Data.DB, Datasnap.DBClient;
type
TForm1 = class(TForm)
Button1: TButton;
ClientDataSet1: TClientDataSet;
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.Button1Click(Sender: TObject);
var
CDS: TClientDataSet;
begin
CDS := TClientDataSet.Create(nil);
CDS.FieldDefs.Add('ID', ftInteger);
CDS.FieldDefs.Add('Nombre', ftString, 20);
CDS.CreateDataSet;
end;
end.