How to determine the availability of database file

Please support our Visual Basic 4 / 5 / 6 advertiser: Programming Forums - DaniWeb Sister Site
Reply

Join Date: Aug 2007
Posts: 47
Reputation: locsin is an unknown quantity at this point 
Solved Threads: 0
locsin locsin is offline Offline
Light Poster

How to determine the availability of database file

 
0
  #1
Dec 1st, 2007
Greetings!

" Visual Basic 6 Program"

I want to open the database file base on the given filename. If the database file is present all data that i want to save will be save in this database. Else, if the database is not present it will create new database to save the data.

My idea is to make temporary database to copy all fields if the database is not present.
Tempory database will be a initial database if the given filename is not present then when i use it into my program then i will save this into another filename.

* the purpose of this is to monitor my monthly report in a year i want to separate all database file every month..

Anybody know how to determine if the database is present or not... If anybody can provide a syntax or logic for me it is a huge help..

thank you in advance
Reply With Quote Quick reply to this message  
Join Date: Nov 2007
Posts: 6
Reputation: student101110 is an unknown quantity at this point 
Solved Threads: 0
student101110 student101110 is offline Offline
Newbie Poster

Re: How to determine the availability of database file

 
0
  #2
Dec 2nd, 2007
1st answer: assuming you want to create ms access database . check if the file exist in your database folder (.mdb) then use the CopyFile App.Path to copy or create your database.

2nd answer: temporary database using ms access dont need to create a file because the database/table exist only during runtime. so filename doesnt really matter.
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


Views: 723 | Replies: 1
Thread Tools Search this Thread



Tag cloud for Visual Basic 4 / 5 / 6
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC