Perdón me confundí con el que es para cargar archivo csv, entonces por eso me daba error, pero tampoco funciona, puse en el OnCloseQuery:
Código Delphi
[-]procedure TForm1.FormOnCloseQuery(Sender: TObject; var CanClose: Boolean);
begin
canClose:=False;
if Application.MessageBox('¿Desea salir?','Atención',mb_OkCancel + mb_IconQuestion)= idOk then begin
SaveListView(ListView1, 'archivo.database', ListView1.Name);
canClose:=True;
end
else begin
canClose := False;
end;
end;
y en el dialogo al cargar el csv:
Código Delphi
[-]if OpenDialog1.Execute then
begin
ListViewFromCSV(ListView1, OpenDialog1.FileName);
StatusBar1.Panels[1].Text := Format('Cliente(s): %d ',[ListView1.Items.Count]);
Memo3.Lines.Add( formatdatetime('dd/mm/yy | hh:nn:ss',now) + ' ; ' + ' Se cargo el archivo: ' + OpenDialog1.FileName + '.')
end;
SaveListView(ListView1, 'archivo.database', ListView1.Name);
y no guarda nada ni crea el archivo.