Board index » delphi » Creating Fields in a closed Recordset

Creating Fields in a closed Recordset

Well, I just want to get a RecordSet export of some data which it doesn't
come from a database... - I want to be able to create new fields, add a
record, populate it and export this...
Is this possible? If yes, can you tell me how?

Thank you
tluch...@smartt.com

 

Re:Creating Fields in a closed Recordset


Here a example:

function TTestform.GetMemdataset : TADODataSet;
var
  ds : TADODataSet;
begin
  ds := TADODataSet.Create(Application);
  ds.FieldDefs.Add('id', ftInteger);
  ds.FieldDefs.Add('firstname, ftString, 20);
  ds.FieldDefs.Add('lastname, ftString, 20);
  ds.CreateDataSet;
  Result := ds;
end;

--
Peter
Pet...@nLogchem.nl

Quote
"Luchian" <tluch...@smartt.com> wrote in message news:3ad3d12b_2@dnews...
> Well, I just want to get a RecordSet export of some data which it doesn't
> come from a database... - I want to be able to create new fields, add a
> record, populate it and export this...
> Is this possible? If yes, can you tell me how?

> Thank you
> tluch...@smartt.com

Other Threads