ISAM好像是指没有正确的安装MDAC,到 http://www.microsoft.com/data/ 下载MDAC。另外,你的调用方法也有一点问题。uses
ComObj;procedure CreateDB(const Database: String);
var
Cat: Variant;
begin
Cat := CreateOleObject('ADOX.Catalog');
Result := Cat.Create('Provider=Microsoft.Jet.OLEDB.4.0;Data Source=' + Database);
end; ~~~~~~~~~~~~
ComObj;procedure CreateDB(const Database: String);
var
Cat: Variant;
begin
Cat := CreateOleObject('ADOX.Catalog');
Result := Cat.Create('Provider=Microsoft.Jet.OLEDB.4.0;Data Source=' + Database);
end; ~~~~~~~~~~~~
不过MDAC2.5更好一点
这个问题,我在DFW上回答过
我的目的不是要创建数据库,而是要使用CompactDatabase对带密码的ACCESS数据库进行压缩(我是从delphi猛料中找到的代码:Delphi编程技巧->数据库相关->对access数据库维护);
我之前已经安装了MDAC2.6,程序之前是可以正常执行的,但重装的WIN2000之后就出现了上述的错误,即使安装了MDAC2.6也一样
Registry, and install or replace the problem file.In the case of the first error message, the file name is directly related to
the attempted operation.In the case of the second error message, the file name is mentioned in the
text of the message. Locate the relevant file in the following table.
File Name Import/Export ISAM for: Windows Registry
Msexcl40.dll Microsoft Excel HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Jet\4.0\Engines\Excel
Msexch40.dll Microsoft Exchange HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Jet\4.0\Engines\Exchange
Msrd2x40.dll Microsoft Jet 2.x HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Jet\4.0\Engines\Jet 2.x
Msrd3x40.dll Microsoft Jet 3.x HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Jet\4.0\Engines\Jet 3.x
Msltus40.dll Lotus 1-2-3 HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Jet\4.0\Engines\Lotus
Mspbde40.dll Imprise Paradox HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Jet\4.0\Engines\Paradox
Mstext40.dll Text HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Jet\4.0\Engines\Text
Msxbde40.dll dBase HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Jet\4.0\Engines\Xbase Use Windows Explorer to search for the file.If the file is found, record its path name; if it is not found,
Start the Add/Remove Programs tool, start the Office 2000 Setup
program, and select the Repair Office option.Open the Windows Registry Editor.Browse to the registry subkey described in the table, and check
the path name against the actual path name.Correct the path name if it is incorrect; proceed with these steps
if it is correct.Close the Registry Editor. If you changed the path name, repeat
the process that produced the original error.If the error persists, or if the path name was correct, rename
the file.
Start the Add/Remove Programs tool, start the Office 2000 Setup
program, and select the Repair Office option.