Include an Access database in VB express project

Hello, does anybody knows if it is possible to include an Access database into my project (created with VBExpress 2005) so that automatically copied to bin and exe folder each time I debug or compile my project or it does not matter where the database has been located in my disc



Answer this question

Include an Access database in VB express project

  • Amit Hiremath

    Thanks alot!!
  • Madisn

    OK Dave Ithink I 've got it ...

    many thanks !!


  • Gazriel

    hi,

    yes you can , simply add a new item to your project and select database the wizard will open change the database type from sqlserver to msaccess and follow up with the wizard

    hope this helps



  • Ragh

    Be careful here.

    If you add the File to your project you should check the property tab for a property which says "Copy to Output Directory". The default is "Copy Always" which means the database will be copied from the original each time you run the program in debug mode. In other words, your changes to the database will not be cumulative. You can change this behavior by changing the property to "Copy only if newer".

    In this manner the reference access database in the design mode remains static and the database in the output directory is the working database in the debug mode. Your program could mess up the working database (which I don't wish on anyone ) and you haven't messed up the original database used in the design mode.

    Hope this helps

    Dave

    davbrook@optonline.net


  • GreatGreenLass

     

    You're right your program can mess up Tables. I'm developing an Access problem and expererment with a table called Bluish.  But the database has an intact copy of that table called MasterBluish where I can always delete a corrupted Bluish and make a new copy of MasterBluish called Bluish.



  • Include an Access database in VB express project