p2p.wrox.com Forums

Need to download code?

View our list of code downloads.


  Return to Index  

beginning_vb thread: Beginning Visual Basic 6


Message #1 by "Phil Perks" <philp@w...> on Mon, 12 Jun 2000 22:33:2
-----Original Message-----

From: Marci [mailto:mmj@s...]

Sent: 12 June 2000 20:11

To: support@w...

Subject: ISBN:1053 Beginning Visual Basic 6

Importance: High



Hello,

I have done case study 2 the library wizard.  Now I would like to be able 

to expand on the library wizard and would like to use a database I created. 

 I notice that the path seems to be prewritten to access the library wizard 

database stored in the Beg VB6/case study 2/   etc. path (its also using 

DAO etc.). I have downloaded this section from your website and this is 

where it saved it on my laptop. What can I do to make it independent and to 

be able to access a different database saved in a different location?



Thanks.

Message #2 by "David Liske" <delmar@t...> on Wed, 14 Jun 2000 06:29:02 -0400
Notice there are a few instances in the code for both frmCIWizard and

frmCOWizard where I specified the database as:



    'Sets LibWizard.mdb as the database used

    strAppDatabase = App.Path & "\LibWizard.mdb"



These are the portions of the code to change in order to use your own

database. Because of this code, it doesn't matter where on the hard drive

the application resides. As long as libwizard.mdb is in the same folder as

the app, the app will be able to find it. You could also do something like

this:



    strAppDatabase = App.Path & "\database\LibWizard.mdb"



The point of this is that you should use App.Path as a starting point.

Otherwise, if you place the database in a totally different folder, there's

a chance the app may never be able to find it.



Another possibility would be to create a registry entry during the

installation and use this to specify where the database was installed. This

is a commonly-used method, but is much more complex than using App.Path.



David Liske

Microsoft HTML Help MVP 1999, 2000

http://mvps.org/htmlhelpcenter/



: -----Original Message-----

: From: Phil Perks [mailto:philp@w...]

: Sent: Monday, June 12, 2000 10:00 PM

: To: beginning vb

: Subject: [beginning_vb] Beginning Visual Basic 6

:

:

: -----Original Message-----

: From: Marci [mailto:mmj@s...]

: Sent: 12 June 2000 20:11

: To: support@w...

: Subject: ISBN:1053 Beginning Visual Basic 6

: Importance: High

:

: Hello,

: I have done case study 2 the library wizard.  Now I would like to be able

: to expand on the library wizard and would like to use a database

: I created.

:  I notice that the path seems to be prewritten to access the

: library wizard

: database stored in the Beg VB6/case study 2/   etc. path (its also using

: DAO etc.). I have downloaded this section from your website and this is

: where it saved it on my laptop. What can I do to make it

: independent and to

: be able to access a different database saved in a different location?

:

: Thanks.

:

: ---

: Wrox Professional Wireless Developer Conference, Amsterdam, July

: 10-12. Covering application of WAP, XML, ASP, Java and C++ to

: wireless computing, choose from 40+ technical sessions delivered

: by industry experts:

http://www.wroxconferences.com/ConferenceHome.asp?ConfID=9







  Return to Index