app distribution w/ DB library reference 
Author Message
 app distribution w/ DB library reference

No, the reference does't have the same absolute path. I would prefer that
the library DB be in the same path as the application and not require an
absolute path for the application.

One of the ideas I've been working with is to put the library DB in the same
path as the application DB and use the path of the CurrentDB.Name to update
the reference for the library, therefore not requiring an absolute path.

The problem seems to be that no string functions can be referenced
(Mid,Left,Right) when ANY missing reference is detected. I need to remove
the the file name from the CurrentDb.name and append the library database
name to the path. I could then update the References Collection
programatically before any library code is referenced.

i.e. Application.References.AddFromFile <LibraryDbPath&File>

If you have any more thoughts on the subject, I'd like to hear them.

Thanks,

Brent

---------------------------------------------------
Remove the 123 from email address
This has been added to fight spam

Quote:

>Is the referenced database held in the same abolute path on your machine
and
>on the machine of the person you are sending the updates to?


>>I've created an Access97 app which uses a library DB containing modules.
>>Everytime I send an new update to be installed, the person installing the
>>app has to refresh the reference to the library database. The application
>is
>>running under the full Access97 (not the runtime), so I have not been
using
>>the installer for distribution.

>>Any Ideas?

>>Thanks,

>>Brent

>>---------------------------------------------------
>>Remove the 123 from email address
>>This has been added to fight spam



Mon, 12 Feb 2001 03:00:00 GMT  
 app distribution w/ DB library reference
Hi Brent,
You can get the functions you mentioned working when you have a broken
reference but you have to use absolute references to them all the time,
until you know your references are ok.

So for example the following would probably fail

    Dim strDBpath as string
    strDBpath = Currentdb.Name
    strDBPath = left(strDBPath,instr(strDBPath,Dir(strDBPath)) -1)

But something like this would work

    Dim loDb as DAO.Database
    Dim intInstr as Integer
    Dim strDBPath as string
    Dim strDBName as string

    set lodb = Access.Currentdb
    strDBPath = lodb.name
    strDBname = VBA.DIR(strDBPath)
    intInstr = VBA.Instr(strDBPath,strDBName)
    strDBPath = VBA.Left(strDBPath,intinstr-1)

(The above written on the fly so probably not 100%)

As you can see all I've done is prefixed each function with the name of the
Library that the function is held in.  You can get the Library names from
the Object Browser.

Quote:

>No, the reference does't have the same absolute path. I would prefer that
>the library DB be in the same path as the application and not require an
>absolute path for the application.

>One of the ideas I've been working with is to put the library DB in the
same
>path as the application DB and use the path of the CurrentDB.Name to update
>the reference for the library, therefore not requiring an absolute path.

>The problem seems to be that no string functions can be referenced
>(Mid,Left,Right) when ANY missing reference is detected. I need to remove
>the the file name from the CurrentDb.name and append the library database
>name to the path. I could then update the References Collection
>programatically before any library code is referenced.

>i.e. Application.References.AddFromFile <LibraryDbPath&File>

>If you have any more thoughts on the subject, I'd like to hear them.

>Thanks,

>Brent

>---------------------------------------------------
>Remove the 123 from email address
>This has been added to fight spam


>>Is the referenced database held in the same abolute path on your machine
>and
>>on the machine of the person you are sending the updates to?


>>>I've created an Access97 app which uses a library DB containing modules.
>>>Everytime I send an new update to be installed, the person installing the
>>>app has to refresh the reference to the library database. The application
>>is
>>>running under the full Access97 (not the runtime), so I have not been
>using
>>>the installer for distribution.

>>>Any Ideas?

>>>Thanks,

>>>Brent

>>>---------------------------------------------------
>>>Remove the 123 from email address
>>>This has been added to fight spam



Tue, 13 Feb 2001 03:00:00 GMT  
 app distribution w/ DB library reference
Hi Terry,

Thank you very much!!! I thought I had hit a dead end, but your solution
worked perfectly. I created a new startup form which resolves my library
references before executing the app.

My application is a front end/back end DB and executes on several
disconnected networks using replication, so I really didn't want to require
an absolute path to the library since I would have had to create this
hardcoded library path on each workstation that uses the application.

Let me know if I can return the favor,

Brent
---------------------------------------------------
Remove the 123 from email address
This has been added to fight spam

Quote:

>Hi Brent,
>You can get the functions you mentioned working when you have a broken
>reference but you have to use absolute references to them all the time,
>until you know your references are ok.

>So for example the following would probably fail

>    Dim strDBpath as string
>    strDBpath = Currentdb.Name
>    strDBPath = left(strDBPath,instr(strDBPath,Dir(strDBPath)) -1)

>But something like this would work

>    Dim loDb as DAO.Database
>    Dim intInstr as Integer
>    Dim strDBPath as string
>    Dim strDBName as string

>    set lodb = Access.Currentdb
>    strDBPath = lodb.name
>    strDBname = VBA.DIR(strDBPath)
>    intInstr = VBA.Instr(strDBPath,strDBName)
>    strDBPath = VBA.Left(strDBPath,intinstr-1)

>(The above written on the fly so probably not 100%)

>As you can see all I've done is prefixed each function with the name of the
>Library that the function is held in.  You can get the Library names from
>the Object Browser.



Tue, 13 Feb 2001 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. DB-Library error 10040: DB-Library network communication layer not loaded

2. HELP...DB app distribution....

3. Questions regarding distribution of an app that uses a DB

4. Reference App Procedure from Library

5. porting Local DB app to internet DB app?

6. Reference DAO 3.6 Object Library or DAO 2.5/3.51 Compatibility Library

7. DB-Library/VBX and CT-Library/VBX

8. Visual Basic App using Foxpro DB vs Access DB vs SQL Server DB

9. Visual Basic App using Foxpro DB vs Access DB vs SQL Server DB

10. Visual Basic 4.0 Runtime library distribution

11. Visual Basic 4.0 Runtime Library Distribution

12. Type Libraries required for distribution?

 

 
Powered by phpBB® Forum Software