DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 3 of 3

Thread: Distribute .mdb with app

  1. #1
    Johannes Guest

    Distribute .mdb with app


    How do I distribute a .mdb file with my app? How will my application know
    where the user has put the file?
    regards,
    Johannes

  2. #2
    Chris Hylton Guest

    Re: Distribute .mdb with app


    The package and deployment wizard that comes with Visual Studio can build
    a setup routine and will allow you to add files (such as your MDB). It can
    also control where the file is installed, either hardcoded or dynamic based
    on where the user chooses to install the app.

    In your EXE, a pretty standard method is to reference your MDB based on the
    path your EXE is installed in...there is a VB object.property called App.Path
    that you can call that returns the path of the EXE, you can use that to create
    the path to your MDB (either in the same directory as your EXE or tack on
    an additional subdirectory path in the application directory.

    The other option is to provide an interface for your users to 'point' to
    the MDB file and keep that entry in the registry...build a menu pick or something
    to set the location of the database.

    Chris

    "Johannes" <GreenDoor@Hotmail.com> wrote:
    >
    >How do I distribute a .mdb file with my app? How will my application know
    >where the user has put the file?
    >regards,
    >Johannes



  3. #3
    Paul Clement Guest

    Re: Distribute .mdb with app

    On 29 Jul 2002 03:53:17 -0700, "Johannes" <GreenDoor@Hotmail.com> wrote:


    How do I distribute a .mdb file with my app? How will my application know
    where the user has put the file?
    regards,

    If the database is to be installed in the same location (or relative path) as the program you can
    use App.Path

    Otherwise you can create a shortcut to the application that contains an argument containing the path
    to the database and use the Command$ function in your app to read it when your application starts.

    The only other options are to prompt the user for the location and search the drive (probably not a
    good idea).


    Paul ~~~ pclement@ameritech.net
    Microsoft MVP (Visual Basic)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center