|
-
Feb 5th, 2002, 11:37 AM
#1
Thread Starter
New Member
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.
-
Feb 5th, 2002, 03:13 PM
#2
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.
-
Feb 5th, 2002, 09:57 PM
#3
Thread Starter
New Member
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.
-
Feb 5th, 2002, 10:16 PM
#4
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.
.
-
Feb 6th, 2002, 01:35 AM
#5
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
-
Feb 6th, 2002, 04:49 AM
#6
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.
.
-
Feb 6th, 2002, 12:46 PM
#7
Originally posted by BG
if it is possible that the database will exceed the size of the drive it is installed on.
-
Feb 6th, 2002, 04:17 PM
#8
Thread Starter
New Member
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.
-
Feb 7th, 2002, 02:13 AM
#9
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")
.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|