954,184 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

How do I create a database at run-time using VB6.0

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!

turbojol
Newbie Poster
1 post since Jul 2006
Reputation Points: 10
Solved Threads: 0
 

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....

Comatose
Taboo Programmer
Team Colleague
2,910 posts since Dec 2004
Reputation Points: 361
Solved Threads: 215
 

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

karnarajan
Newbie Poster
1 post since Aug 2007
Reputation Points: 10
Solved Threads: 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!

ashishnic
Newbie Poster
1 post since Jul 2008
Reputation Points: 10
Solved Threads: 0
 
Hello, May i know the coding to create access database at runtime vb using vb 6.0


and what write code for that project

shri974
Newbie Poster
1 post since Jul 2008
Reputation Points: 10
Solved Threads: 0
 

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

debasisdas
Posting Genius
6,870 posts since Feb 2007
Reputation Points: 666
Solved Threads: 434
 

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.

Teropod
Light Poster
36 posts since Jul 2008
Reputation Points: 10
Solved Threads: 6
 

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

alkeshnayak
Newbie Poster
6 posts since Jul 2008
Reputation Points: 10
Solved Threads: 0
 
Hey... You Just Create Blank Structure Of Your Data Base... And Use FileCopy , Command Use This Commnad Wheever You Required All The Best


will that work for SQL SERVER ?

debasisdas
Posting Genius
6,870 posts since Feb 2007
Reputation Points: 666
Solved Threads: 434
 

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.

Teropod
Light Poster
36 posts since Jul 2008
Reputation Points: 10
Solved Threads: 6
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You