Results 1 to 6 of 6

Thread: setting path of my applications database

  1. #1

    Thread Starter
    New Member
    Join Date
    Aug 2006
    Posts
    1

    Question setting path of my applications database

    i have a VB program that access a microsoft access database dbcourse.mdb in this path c:\course\dbcourse.mdb..all the bound countrols access this database in this path set in its connection string.
    e.g.
    adodc control
    connectionstring=c:\course\dbcourse.mdb.

    my problem is, actually its more of an inquiry than a problem..
    if i install the system to another computer, should i really need to copy manually the course folder containing the dbcourse.mdb file to drive c? or there is another way of automatically installing this with the exe file?

    i really wish i can deploy the program by just a click of setup.exe and all the needed files like *.mdb will be all in its place.

    how should i do it?

    thanks in advance for your help...

  2. #2
    Banned randem's Avatar
    Join Date
    Oct 2002
    Location
    Maui, Hawaii
    Posts
    11,385

    Re: setting path of my applications database

    You can create an installation package and include the database and it will be installed also. The problem youre going to have is that the path that you specified will not be on the target computer so your application will fail. You need to dynamically set the datasource to the app.path.

    Using bound controls is evil... You should learn about ADO and a DSN-Less connection so that you can operate more smoothly.

  3. #3
    PowerPoster RhinoBull's Avatar
    Join Date
    Mar 2004
    Location
    New Amsterdam
    Posts
    24,132

    Re: setting path of my applications database

    Quote Originally Posted by randem
    ... The problem youre going to have is that the path that you specified will not be on the target computer so your application will fail. You need to dynamically set the datasource to the app.path...
    Not necessary - you may specify any folder you wish and when it is deployed folder will be created (if it isn't there yet).
    Different utilities requires different implementation procedure.

  4. #4
    Banned randem's Avatar
    Join Date
    Oct 2002
    Location
    Maui, Hawaii
    Posts
    11,385

    Re: setting path of my applications database

    Of course not necessarily....

    Try installing it on a network drive or just the D: drive or any drive other than c:

    Once the path is hardcoded your option are very limited.

    ??????????
    Last edited by randem; Aug 7th, 2006 at 09:54 PM.

  5. #5
    PowerPoster RhinoBull's Avatar
    Join Date
    Mar 2004
    Location
    New Amsterdam
    Posts
    24,132

    Re: setting path of my applications database

    First, you shouldn't be installing on any media type drives.
    And second, as long as you have admin ot at least "read/write" permissions you may install it anywhere within your network.
    And there isn't any "hardcoded path" (except for the destination folder name if any at all) - any path is dynamic and depends on the value specified when application was packaged.

  6. #6
    Banned randem's Avatar
    Join Date
    Oct 2002
    Location
    Maui, Hawaii
    Posts
    11,385

    Re: setting path of my applications database

    Quote Originally Posted by RhinoBull
    First, you shouldn't be installing on any media type drives.
    Why??? I can install anything anywhere I please...
    Quote Originally Posted by RhinoBull
    And there isn't any "hardcoded path"
    Well, what do you call "connectionstring=c:\course\dbcourse.mdb".
    Quote Originally Posted by RhinoBull
    any path is dynamic and depends on the value specified when application was packaged.
    Well, this is not dynamic - "connectionstring=c:\course\dbcourse.mdb" it's fixed

    Installing a program on a destination drive of D: when the application has a fixed path location of it's internal files will not work... ie. "connectionstring=c:\course\dbcourse.mdb" look for this file when the app is installed on D: just won't work...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width