Solved

Creating an MS Access database from ADO?

Posted on 2002-07-16
5
151 Views
Last Modified: 2010-05-02
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
Comment
Question by:gwiz
  • 3
5 Comments
 
LVL 70

Accepted Solution

by:
Éric Moreau earned 100 total points
ID: 7158295
0
 
LVL 3

Expert Comment

by:schworak
ID: 7158382
Is there no way to do it with standard ADO 2.5?
0
 
LVL 70

Expert Comment

by:Éric Moreau
ID: 7158384
No you need ADOX.
0
 
LVL 70

Expert Comment

by:Éric Moreau
ID: 7158385
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
 
LVL 51

Expert Comment

by:Ryan Chong
ID: 7158895
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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Introduction I needed to skip over some file processing within a For...Next loop in some old production code and wished that VB (classic) had a statement that would drop down to the end of the current iteration, bypassing the statements that were c…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

828 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question