Results 1 to 9 of 9

Thread: Creating Path For db in PDW

  1. #1

    Thread Starter
    New Member CandleMan's Avatar
    Join Date
    Feb 2002
    Location
    Texas
    Posts
    10

    Question Creating Path For db in PDW

    I currently finished my app and then went into the Package Deployment wizard to create the setup. However During this process it allows me to set the path of the Main.mdb as $Syspath and so forth. What is the option or what is the way to seet the path of the db to whats in the code?????
    Knowledge is power....No wonder I'm weak.

  2. #2
    BG
    Guest
    If I understood your question correctly try this, Keep in mind that I usually don't understand correctly

    You have to modify the Setup Package code yourself. Ther is no way to do it using the wizzard. Visual Studio 6.0 ships the Visual Basic source code for the Package and Deployment Wizard. The project is located in "Program Files\Microsoft Visual Studio\VB98\Wizards\Template." However, It's probably not a good Idea to code the paths in your app. It's better to write the path to the registry during setup and retrieve it when you run your app. That will give you flexibility when you install to a machine that is low on drive space and have to change install Drives/directories at setup time.

  3. #3

    Thread Starter
    New Member CandleMan's Avatar
    Join Date
    Feb 2002
    Location
    Texas
    Posts
    10
    Thanks I'll do that...as soon as I figure out how...Like I said I am REAL new to this. But I will research that . That sounds like what I want to do anyway.
    Knowledge is power....No wonder I'm weak.

  4. #4
    Randalf the Red honeybee's Avatar
    Join Date
    Jun 2000
    Location
    off others' brains
    Posts
    4,345

    Well ...

    For this simple task you don't need to modify the Setup package itself. While determining file locations, it's often best to keep your database file (especially the Access db) in the same folder as the application. So, you can choose $(AppPath) in the options. All these options are probably in a dropdown, so no worry about mistyping.

    Also if you created a special folder called 'Data' under your app folder and wanted to store it there, you can enter $(AppPath)\Data in the PDW setup. When the app is installed, PDW will create a folder 'data' under the folder in which the app was installed and copy the mdb over there.

    .
    I am not a complete idiot. Some parts are still missing.
    Check out the rtf-help tutorial
    General VB Faq Thread
    Change is the only constant thing. I have not changed my signature in a long while and now it has started to stink!
    Get more power for your floppy disks. ; View honeybee's Elite Club:
    Use meaningfull thread titles. And add "[Resolved]" in the thread title when you have got a satisfactory response.
    And if that response was mine, please think about giving me a rep. I like to collect them!

  5. #5
    BG
    Guest
    Very good advise from honeybee

    It is still a good Idea to look into modifying the install pack yourself. It will come in handy some day. Personally, I gave up on goofing with the Microsheit stuff and switched to install shield. It is tenfold eaiser to create a formidable install package.

    Just keep in mind. It is not always a good Idea to keep the app in the same directory as the database if it is possible that the database will exceed the size of the drive it is installed on. Been burnt there a few times if you havn't noticed by my mindless rantings

  6. #6
    Randalf the Red honeybee's Avatar
    Join Date
    Jun 2000
    Location
    off others' brains
    Posts
    4,345

    Well ...

    In today's age of 40GB and 80GB hdds, the database size is quite an insignificant factor, I think, unless you are out to make a huge 'software', not an 'application'. For Access databases, I still think it's a good idea to put the MDB in the same folder as the application. Even for other data files it would be better, because then in your application you don't need to write code to find out the path to the db. It's always App.Path, or simply absent.

    .
    I am not a complete idiot. Some parts are still missing.
    Check out the rtf-help tutorial
    General VB Faq Thread
    Change is the only constant thing. I have not changed my signature in a long while and now it has started to stink!
    Get more power for your floppy disks. ; View honeybee's Elite Club:
    Use meaningfull thread titles. And add "[Resolved]" in the thread title when you have got a satisfactory response.
    And if that response was mine, please think about giving me a rep. I like to collect them!

  7. #7
    BG
    Guest
    Originally posted by BG
    if it is possible that the database will exceed the size of the drive it is installed on.

  8. #8

    Thread Starter
    New Member CandleMan's Avatar
    Join Date
    Feb 2002
    Location
    Texas
    Posts
    10

    Thumbs up You Guys ROCK!!

    Just wanted to say thanks for everyone's help. I got one more question and I'll leave everyone alone. If I keep the database in its own folder how do I bind to that database inside the code (i.e db = DBEngine.Workspaces.Opendatabase ("? Main.mdb") ).
    Knowledge is power....No wonder I'm weak.

  9. #9
    Randalf the Red honeybee's Avatar
    Join Date
    Jun 2000
    Location
    off others' brains
    Posts
    4,345

    Well ...

    Originally posted by CandleMan
    Just wanted to say thanks for everyone's help. I got one more question and I'll leave everyone alone. If I keep the database in its own folder how do I bind to that database inside the code (i.e db = DBEngine.Workspaces.Opendatabase ("? Main.mdb") ).
    If you keep the db in the same folder as the application, either you don't include any path, or you use App.Path. So your code could look like:
    Code:
    Set db = OpenDatabase("main.mdb")
    or
    Code:
    Set db = OpenDatabase(App.Path & "\main.mdb")
    .
    I am not a complete idiot. Some parts are still missing.
    Check out the rtf-help tutorial
    General VB Faq Thread
    Change is the only constant thing. I have not changed my signature in a long while and now it has started to stink!
    Get more power for your floppy disks. ; View honeybee's Elite Club:
    Use meaningfull thread titles. And add "[Resolved]" in the thread title when you have got a satisfactory response.
    And if that response was mine, please think about giving me a rep. I like to collect them!

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