Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 156
  • Last Modified:

Creating an MS Access database from ADO?

I need to CREATE from scratch an MS Access database with tables and fields all from scratch using ADO... Where do I start?


Using DAO I knew how to do it but can't seem to figure it out in ADO.


Why? Why? Why? everyone asks why would I do this... The program will collect data but I don't want to send out a database in the install and some tables won't be needed for some users. This way only what is needed by the user will be created at the time they need it.
0
gwiz
Asked:
gwiz
  • 3
1 Solution
 
Éric MoreauSenior .Net ConsultantCommented:
0
 
schworakCommented:
Is there no way to do it with standard ADO 2.5?
0
 
Éric MoreauSenior .Net ConsultantCommented:
No you need ADOX.
0
 
Éric MoreauSenior .Net ConsultantCommented:
You can create new tables using the "CREATE TABLE" syntax using the Execute method of your ADO connection object but the database itself must be created using ADOX.
0
 
Ryan ChongCommented:
Here are some other examples:

Create a Database, Tables, Columns and Indexes Using ADOX
http://www.freevbcode.com/ShowCode.Asp?ID=3315

Create an Access 2000 Database Using ADOX
http://www.freevbcode.com/ShowCode.Asp?ID=803
0

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now