I am trying to create a temporary alias and am using the following code - which
I got somewhere (??) ages ago.
Firstly I got an exception to the word "Session" so I installed a Session component.
Which seemed to remove the exception. But then I got an exception to using the words
"Screen" and "crHourglass" as being "UnDeclared identifier".
Can someone throw some light on this please?
procedure TdmFamily.DataModuleCreate(Sender: TObject);
var
strAliasName, // name for the temporary alias
strAliasPath : string; // directory the alias points to
begin
strAliasName := 'Family';
strAliasPath := 'c:\h\Lectures\Day13\Tables';
with Session do
try
screen.cursor := crHourglass;
if not isAlias( strAliasName ) then
addStandardAlias( strAliasName, strAliasPath, 'Paradox' );
finally
screen.cursor := crDefault
end;
end;