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

Reply

Join Date: Jul 2006
Posts: 1
Reputation: turbojol is an unknown quantity at this point 
Solved Threads: 0
turbojol turbojol is offline Offline
Newbie Poster

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

 
0
  #1
Jul 4th, 2006
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!
Reply With Quote Quick reply to this message  
Join Date: Dec 2004
Posts: 2,413
Reputation: Comatose is a jewel in the rough Comatose is a jewel in the rough Comatose is a jewel in the rough Comatose is a jewel in the rough 
Solved Threads: 211
Team Colleague
Comatose's Avatar
Comatose Comatose is offline Offline
Taboo Programmer

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

 
0
  #2
Jul 4th, 2006
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....
Reply With Quote Quick reply to this message  
Join Date: Aug 2007
Posts: 1
Reputation: karnarajan is an unknown quantity at this point 
Solved Threads: 0
karnarajan karnarajan is offline Offline
Newbie Poster

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

 
0
  #3
Aug 31st, 2007
Hello,
May i know the coding to create access database at runtime vb using vb 6.0
Reply With Quote Quick reply to this message  
Join Date: Jul 2008
Posts: 1
Reputation: ashishnic is an unknown quantity at this point 
Solved Threads: 0
ashishnic ashishnic is offline Offline
Newbie Poster

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

 
0
  #4
Jul 16th, 2008
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!
Reply With Quote Quick reply to this message  
Join Date: Jul 2008
Posts: 1
Reputation: shri974 is an unknown quantity at this point 
Solved Threads: 0
shri974 shri974 is offline Offline
Newbie Poster

how use the dao control

 
0
  #5
Jul 16th, 2008
Originally Posted by karnarajan View Post
Hello,
May i know the coding to create access database at runtime vb using vb 6.0
and what write code for that project
Reply With Quote Quick reply to this message  
Join Date: Feb 2007
Posts: 2,082
Reputation: debasisdas will become famous soon enough debasisdas will become famous soon enough 
Solved Threads: 124
debasisdas's Avatar
debasisdas debasisdas is offline Offline
Postaholic

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

 
0
  #6
Jul 16th, 2008
you need to create the database at designtime separately not at runtime.
Share your Knowledge.
Reply With Quote Quick reply to this message  
Join Date: Jul 2008
Posts: 36
Reputation: Teropod is an unknown quantity at this point 
Solved Threads: 6
Teropod Teropod is offline Offline
Light Poster

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

 
0
  #7
Jul 16th, 2008
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.
Reply With Quote Quick reply to this message  
Join Date: Jul 2008
Posts: 6
Reputation: alkeshnayak is an unknown quantity at this point 
Solved Threads: 0
alkeshnayak alkeshnayak is offline Offline
Newbie Poster

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

 
0
  #8
Jul 17th, 2008
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
Reply With Quote Quick reply to this message  
Join Date: Feb 2007
Posts: 2,082
Reputation: debasisdas will become famous soon enough debasisdas will become famous soon enough 
Solved Threads: 124
debasisdas's Avatar
debasisdas debasisdas is offline Offline
Postaholic

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

 
0
  #9
Jul 17th, 2008
Originally Posted by alkeshnayak View Post
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 ?
Share your Knowledge.
Reply With Quote Quick reply to this message  
Join Date: Jul 2008
Posts: 36
Reputation: Teropod is an unknown quantity at this point 
Solved Threads: 6
Teropod Teropod is offline Offline
Light Poster

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

 
0
  #10
Jul 17th, 2008
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.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the Visual Basic 4 / 5 / 6 Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC