Link to home
Start Free TrialLog in
Avatar of zayn
zayn

asked on

Manige Ms access in Delphi

How To Create Ms database and assin PassWord   to database and copy table by using (Select * From .....)  in Delphi
Avatar of PatHartman
PatHartman
Flag of United States of America image

You need to use ADO to manipulate objects from outside of Access.
You can do it with DAO as well, if you can use DAO in Delphi. To create a database in DAO:

Dim db AS DAO.Database
Set db = DBEngine.CreateDatabase("Database.accdb", ";pwd=abc123")

I'm not sure what the Delphi equivalents would be, but it would seem to be somewhat similar, based on the few posts I've seen.
ASKER CERTIFIED SOLUTION
Avatar of Sinisa Vuk
Sinisa Vuk
Flag of Croatia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of zayn
zayn

ASKER

iwhat is Wrong in thes code help...
 
 ADOConnection1.Execute('Select * INTO T1 IN  [Provider=Microsoft.Jet.OLEDB.4.0;Data Source='+db+';Jet OLEDB:Database Password='+pwd+';] From T2;');
I don't use Delphi so I can't tell you what is wrong.  I would create a variable and populate the variable with the select string.  That way you can look at the string prior to executing it to see what it looks alie and make sure that the variables have been expanded correctly.  Once you do that, post the SQL String if you can't identify the problem.