I have been using Delphi 7 for several years with no problem. When I swiched to Delphi XE2 I get compilers errors in previously working programs. Is there a solution to this compatability problem? Can I run XE2 to respond likr 7?
The first error was that a variable, “UnitName” was not valid. At this point there was an indication of two errors. I changed the variable name and that problem was resolved. Then I got an err or in the following procedure:
procedure TForm_EditVetOrMem.DBGrid1TitleClick(Column: TColumn);
{$J+}
const PreviousColumnIndex : integer = 1;
{$J-}
begin
if DBGrid1.DataSource.DataSet is TCustomADODataSet
then
with TCustomADODataSet(DBGrid1.DataSource.DataSet) do
begin
if (Pos(Column.Field.FieldName, Sort) = 1)
and (Pos(' DESC', Sort)= 0) then
Sort := Column.Field.FieldName + ' DESC'
else
Sort := Column.Field.FieldName + ' ASC';
end;
end;
There were 7 errors identified with the following error message:
[DCC Error] EditVetOrMem.pas(212): Ambiguous overload lall to Pos
System.pas(25029): Related method: function Pos(const string;const string); Integer;
System.pas(25133): Related method: function Pos(const Widestring;const Widestring); Integer;
[DCC Warning] EditVetOrMem.pas(212): Impplicit string cast with potential data loss from ‘string’ to ‘ShortString’;
This solved the problem but there is one more problem. My program consists of 19 seperate programs called from a Memu. In these programs there are several DBGrids. In the DBGrids there is a border but no vertical or horizontal lines. How can I fix this problem?
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.