function CreateAccessFile(FileName: string; PassWord: string = ''): boolean;
const
SConnectionString = 'Provider=Microsoft.Jet.OLEDB.4.0;Data Source=%s;Jet OLEDB:Database Password=%s;';
var
vCatalog: OleVariant;
begin
try
vCatalog := CreateOleObject('ADOX.Catalog');
vCatalog.Create(format(SConnectionString, [FileName, PassWord]));
Result := True;
except
Result := False;
end;
end;
浙公网安备 33010602011771号