Board index » delphi » how can I create an Access 2002 mdb format with ADO ?
Guto
![]() Delphi Developer |
how can I create an Access 2002 mdb format with ADO ?2003-12-02 04:19:32 AM delphi282 Hi , the code below works if I configure "access database default format" on options of Access XP, otherwise this code create and Access 2000 mdb I need to create access 2002 mdb on machines that don╢t have microsoft access Xp installed... Any help would be appreciated, Thanks, Guto. function CreateDatabaseSample ( aFileName: String ):boolean; var ADOXCatalog : TADOXCatalog; lConnStr : String; begin result := false; lConnStr := 'Provider=Microsoft.Jet.OLEDB.4.0;Data Source=' + aFileName + ';Jet OLEDB:Engine Type=4'; ADOXCatalog := TADOXCatalog(nil); if Assigned( ADOXCatalog) then try ADOXCatalog.Create1(lConnStr); result := true; finally FreeAndNil( ADOXCatalog ); end; end; |