Ver Mensaje Individual
  #1  
Antiguo 29-02-2020
Avatar de Edwardfeliz
Edwardfeliz Edwardfeliz is offline
Miembro
 
Registrado: abr 2014
Posts: 102
Reputación: 11
Edwardfeliz Va por buen camino
Incompatibilidad de un proyecto en una función del delphi 7 al 10.3

Hola, Migre de delphi 7 al 10.3, pero al ejecutar el proyecto me sale este error en dos lineas de una función que hago para sumar los totales de un dbgrid.

Código Delphi [-]
function SumarTotal(Grid: TDBGrid; const AFieldName: string): Currency;
var
  BM: TBookMarkStr;
begin
  Result:= 0;
  with Grid.DataSource.DataSet do
  begin
    BM:=  Bookmark;              //---------------En esta linea---------------------
    DisableControls;
    while not Eof do
    begin
      Result:= Result + FieldByName(AFieldName).AsCurrency;
      Next;
    end;
    BookMark:= BM;   //---------------En esta linea---------------------
    EnableControls;
  end;
end;

Este es el error.

Código Delphi [-]
[dcc32 Error] Facturar.pas(125): E2010 Incompatible types: 'AnsiString' and 'System.TArray'
[dcc32 Error] Facturar.pas(132): E2010 Incompatible types: 'System.TArray' and 'AnsiString'

Como puedo solucionarlo?
Responder Con Cita