Hello to all,
Please can someone help me on how to create a databse at run-time.
I have created a database with Access that I am using with the VB application and it is working well.
But now, I want the user to be able to create another database that will have the same format as the one I created in Access.
Thanks in advance for your help!

Make sure you read the tutorial in the sticky thread: http://www.daniweb.com/techtalkforums/thread41057.html, and another alternative is to actually copy the file (with VB) to a new location with a new name, and then have an SQL query to remove all the records....

Hello,
May i know the coding to create access database at runtime vb using vb 6.0

Hello to all,
Please can someone help me on how to create a databse in sql esrver 2000 .
I have created a database with Access that I am using with the VB application and it is working well.
But now, I want the user to be able to create another database that will have the same format as the one I created in Access.
Thanks in advance for your help!

Hello,
May i know the coding to create access database at runtime vb using vb 6.0

and what write code for that project

you need to create the database at designtime separately not at runtime.

If you wanna new empty database with same table structure try different approach, make your empty database, stash it in folder or sub folder where your project is. Make button or any other command that will copy file from that directory to another one, change its name to whatever u like and make connection to that new and empty database.

You can do similar thing if u wanna make backup of existing database.

It maybe isn't professional approach but i think it could be good resolution.

Sorry to say these but if u need new tables
with new fields for same user who uses same application then communication between Software developer <-> software user has failed or u need to make better database.

I think that vb have some database creation functions.

You can all so try and find something in win api list.

And last i think hardest and longest make your own database file. You may or may not find some pdf file on internet that will guide you on file structure.

But those last three will be like your making your own access or any other database creation program and you will lose more time to learn users how to use it
you will really find anything in those databases and it will be unmaintainable.

And believe me no matter how simple u make it there will all ways be someone who will find it hard and user non friendly.

I hope that helped.

Hey... You Just Create Blank Structure Of Your Data Base... And Use
FileCopy <SourcePath>, <TargetPath> Command
Use This Commnad Wheever You Required
All The Best

Hey... You Just Create Blank Structure Of Your Data Base... And Use
FileCopy <SourcePath>, <TargetPath> Command
Use This Commnad Wheever You Required
All The Best

will that work for SQL SERVER ?

Database should be a file, file copy is something like left click of mouse on file and paste in other directory. Will that work in your case you will have to try it.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.