Solved

Scripting databases (100 pts)

Posted on 2000-03-24
5
136 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 5 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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

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

If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
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…

809 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