The following code compiles and workes using Delphi 5 but not using Delphi 10.1 Berlin;
function CopyTable(const tSource: TwwTable; const Destination: string): DBIResult;
var
pSourceTableName, pDestination: array[0..DBIMAXTBLNAMELEN] of char;
begin
tSource.Open;
StrPCopy(pSourceTableName, tSource.TableName);
StrPCopy(pDestination, Destination);
Result := DbiCopyTable(tSource.DBHandle, False, pSourceTableName, nil, pDestination);
tSource.Close;
end;
Compiler reports [dcc32 Error] SUPPORT1.PAS(3655): E2010 Incompatible types: 'PAnsiChar' and 'array[0..260] of Char' twice.
How do I change it such that it compiles clean and works as intended? NB. I cannot scrap the BDE at this stage of a large migration.