Bonjour,

Voici un bout de mon code

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
type

TDataRecord = record
  GUID : TGUID;
  Date : TDate;
  Heure : TTime;
  Montant : Integer;
  Description : String;
  Categorie : Integer;
  Compte : Integer;
  Repetition : Integer;
  Memo : String;
end;


procedure TdtmDataModule.LoadData(var DataRecord : TdataRecord; Index : Integer);
var
  Enregistrement : String;
  i : Integer;
  Texte : ShortString;
begin
  //
  if FileExists(NomMaBase) then
  begin

    i := 0;

    AssignFile(MaBase,NomMaBase);

    Reset(MaBase);

    while not Eof(MaBase) or (i <> Index) do
    begin

      Readln(MaBase,Enregistrement);

      Inc(i);
    end;

    CloseFile(MaBase);

    if (i = Index - 1) then
    begin
      with DataRecord  do
      begin
        Texte := Copy(Enregistrement,1,18);
        GUID := StrToGUID(Texte);
        delete(Enregistrement,1,21);
        Date := StrToDate(copy(Enregistrement,1,8));
        delete(Enregistrement,1,11);
        Heure := StrToTime(copy(Enregistrement,1,8));
        Texte := copy(Enregistrement,1,pos('","',Enregistrement))
        Montant := IntToStr(Texte);

        Description := copy(Enregistrement,1,pos('","',Enregistrement));

le compilateur me dit "Types incompatibles : PWideChar et WideString
et Aucune version surchargée de IntToStr ne peut être appelée avec ces arguments

je suis un peu largué, si vous aviez un conseil ou plusieurs à me donner

Merci de tout coeur