[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Scripting databases (100 pts)

Posted on 2000-03-24
5
Medium Priority
?
155 Views
Last Modified: 2010-05-18
I've posted a question on the VB/Databases forum that someone might be able to help with here. 100pts on offer.

Basically I want to write code that will generate a database "on the fly", ie create all the tables, querydefs and relationships to replicate an existing database that I have.
If you can give me an example, or even better know of any tools to help, please see the Q below :

http://www.experts-exchange.com/jsp/qShow.jsp?ta=vbdatabases&qid=10316718 
0
Comment
Question by:paulstamp
  • 2
  • 2
5 Comments
 
LVL 3

Expert Comment

by:jjmartin
ID: 2653853
This might help, it goes over all the functions you might ever use for ADO and DAO database access.  The last few pages cover creating tables, queries, making things replicable... etc.

http://www.microsoft.com/data/ado/adotechinfo/dao2ado.htm
0
 
LVL 1

Expert Comment

by:jonder
ID: 2656674
The database that you want to replicate do you want the data that is inside the Tables as well, or do you just want a replicated empty database?

What type of database Access, SQL, dBase, ...?
0
 
LVL 1

Accepted Solution

by:
jonder earned 15 total points
ID: 2656682
Sorry I just went to your link and read the question.

But what I have done in the past is changed the Database name ie. MSAccess.mdb to {anyname}.dll and placed it in the System directory.
When I needed to create a new database I simply copied the template over to the destination directory renamed to Whatever.mdb.


0
 
LVL 3

Author Comment

by:paulstamp
ID: 2659775
Adjusted points from 0 to 5
0
 
LVL 3

Author Comment

by:paulstamp
ID: 2659776
jonder... not a bad idea, unfortunately samopal and morpho have both provided solutions that let me do it in code.

Thanks anyway.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Suggested Courses

834 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