How can I create new AccessDB and table with UniDac components.
I have D2010.
Thank you.
AccessDB
Hello,
At the moment UniDAC does not allow creating MS Access databases. We will consider adding this possibility in one of the future versions. Now you can create a database on your own using the following code:
At the moment UniDAC does not allow creating MS Access databases. We will consider adding this possibility in one of the future versions. Now you can create a database on your own using the following code:
Code: Select all
uses comobj,sysutils;
............
function CreateAccessDatabase(FileName : String) : String;
var cat : OLEVariant;
begin
result := '';
try
cat := CreateOleObject('ADOX.Catalog');
cat.create ('Provider=Microsoft.Jet.OLEDB.4.0;Data Source='+Filename+';');
cat := NULL;
except
on e : Exception do result := e.message;
end;
end;