79751311

Date: 2025-08-30 17:30:44
Score: 7
Natty:
Report link

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.
Reasons:
  • Blacklisted phrase (1): I have the same problem
  • RegEx Blacklisted phrase (1.5): can't find the solution
  • RegEx Blacklisted phrase (2): can't find the solution
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Me too answer (2.5): I have the same problem
  • Low reputation (1):
Posted by: Fernando Alonso