We have the following code in a Delphi 6 program.
The user has the runtime files of Access97 instaslled by us to
run a program written in Acess97.
They also have a full installation of Access 2000.
Ths Delphi program uses the Access97 unit from Delphi and the ComObj unit among others.
When this user goes to execute the OpenCurrentDatabase
method, they receive the following error message:
Error in opendatabase: Class not registered.
In debugging this, the actual class is registered, but since only the runtime files are
installed, the com server is creating an Access 2000 oleobject and getting this error trying
to open an Access 97 database with an Access ole object.
Any help in eliminating this error would be greatly appreciated.
Uses
(Among others) Access97, Comobj
Var
AccessOLE,Myform:Variant;
Begin
Try
AccessOLE := CreateOLEObject('access.application.8');
except
on E:exception do
ShowMessage('Error creating Access object '+E.Message);
end;
Try
AccessOLE.application.OpenCurrentDatabase(DriveMDE+ 'quickfl\qqfl.mde',true);
except
on E:exception do
begin
ShowMessage('Error in opendatabase. '+E.Message+' (file ' + DriveMDE + 'quickfl\qqfl.mde). Application will terminate');
AccessOLE := unassigned;
halt;
end;
end;
The user has the runtime files of Access97 instaslled by us to
run a program written in Acess97.
They also have a full installation of Access 2000.
Ths Delphi program uses the Access97 unit from Delphi and the ComObj unit among others.
When this user goes to execute the OpenCurrentDatabase
method, they receive the following error message:
Error in opendatabase: Class not registered.
In debugging this, the actual class is registered, but since only the runtime files are
installed, the com server is creating an Access 2000 oleobject and getting this error trying
to open an Access 97 database with an Access ole object.
Any help in eliminating this error would be greatly appreciated.
Uses
(Among others) Access97, Comobj
Var
AccessOLE,Myform:Variant;
Begin
Try
AccessOLE := CreateOLEObject('access.application.8');
except
on E:exception do
ShowMessage('Error creating Access object '+E.Message);
end;
Try
AccessOLE.application.OpenCurrentDatabase(DriveMDE+ 'quickfl\qqfl.mde',true);
except
on E:exception do
begin
ShowMessage('Error in opendatabase. '+E.Message+' (file ' + DriveMDE + 'quickfl\qqfl.mde). Application will terminate');
AccessOLE := unassigned;
halt;
end;
end;