Home > Archive > MS Access Multiuser > April 2005 > Pre-linking backend before distribution









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Pre-linking backend before distribution
rgrantz

2005-04-06, 8:06 pm

I looked at many posts regarding linking tables or refreshing links via
code, but none seemed to address my particular situation (which surprised
me).

I have a development PC and need to distribute a Front End/Back End db to
several different locations. Each will have a different UNC path to their
own shared folder in which the Back End resides. How can I pre-set the
links with the right address before distributing the application? The end
product FrontEnd is a .mde file with no menus, and I don't really feel safe
having the users use the LTM and then create mde's themselves.

Is this possible?

Thanks for reading, and for any help



TomU

2005-04-06, 8:06 pm

Take a look at Dev Ashish's re-link code here:
http://www.mvps.org/access/tables/tbl0009.htm

In this code the path to the linked table comes from a Windows dialog but
you could modify it to come from a table that is internal to your FE.
Assuming you know the proper paths for all your users, you could pre-load the
path to each user's BE database.

TomU

"rgrantz" wrote:

> I looked at many posts regarding linking tables or refreshing links via
> code, but none seemed to address my particular situation (which surprised
> me).
>
> I have a development PC and need to distribute a Front End/Back End db to
> several different locations. Each will have a different UNC path to their
> own shared folder in which the Back End resides. How can I pre-set the
> links with the right address before distributing the application? The end
> product FrontEnd is a .mde file with no menus, and I don't really feel safe
> having the users use the LTM and then create mde's themselves.
>
> Is this possible?
>
> Thanks for reading, and for any help
>
>
>
>

rgrantz

2005-04-06, 8:06 pm

Is this the only way to do this? That seems like a lot of code, and after
spending about an hour trying to get it to work, I was hoping that maybe
there's just some smaller code snippet that I can run once that sets the
path, database name, and tables to link to. I don't need to prompt for the
path or table names or anything, I'll know ahead of time, and would like (if
possible) to be able to set the links before making a .mde.

Thanks for the help


"TomU" <TomU@discussions.microsoft.com> wrote in message
news:F116DF68-BC29-4638-9D29- 88754F3A4CF4@microso
ft.com...
> Take a look at Dev Ashish's re-link code here:
> http://www.mvps.org/access/tables/tbl0009.htm
>
> In this code the path to the linked table comes from a Windows dialog but
> you could modify it to come from a table that is internal to your FE.
> Assuming you know the proper paths for all your users, you could pre-load

the[color=darkred]
> path to each user's BE database.
>
> TomU
>
> "rgrantz" wrote:
>
surprised[color=dark
red]
to[color=darkred]
their[color=darkred]

end[color=darkred]
safe[color=darkred]


Andy

2005-04-06, 8:06 pm

I have developed a LinkTables module which you are welcome to use. It is
form driven, uses CommonDialog, table names and databases are pre-stored.

It's yours for the asking (hiestand@kgexpress.net)


Andy

rgrantz wrote:
> Is this the only way to do this? That seems like a lot of code, and after
> spending about an hour trying to get it to work, I was hoping that maybe
> there's just some smaller code snippet that I can run once that sets the
> path, database name, and tables to link to. I don't need to prompt for the
> path or table names or anything, I'll know ahead of time, and would like (if
> possible) to be able to set the links before making a .mde.
>
> Thanks for the help
>
>
> "TomU" <TomU@discussions.microsoft.com> wrote in message
> news:F116DF68-BC29-4638-9D29- 88754F3A4CF4@microso
ft.com...
>
>
> the
>
>
> surprised
>
>
> to
>
>
> their
>
>
> end
>
>
> safe
>
>
>
>

Scott McDaniel

2005-04-06, 8:06 pm

Another option, if you know the hardcoded path to the endusers tables, is to
mimic their setup on your own network.

Alternatively, you can do this:

Function RefreshLinks(strFile
Name As String) As Boolean
' Refresh links to the supplied database. Return True if successful.
Dim dbs As Database, tdf As TableDef
' Loop through all tables in the database.
Set dbs = CurrentDb
For Each tdf In dbs.TableDefs
If Len(tdf.Connect) > 0 Then ' If the table has a connect string
tdf.Connect = ";DATABASE=" & strFileName
Err.Clear
On Error Resume Next
tdf.RefreshLink ' Relink the table.
If Err <> 0 Then Exit Function
End If
Next tdf
RefreshLinks = True ' Relinking complete.
End Function
This came from the Solutions.mdb database that ships with access ...
"FileName" is the path to the backend files. It probably could use some
polishing, but it'll do what you want.


------------------------------_---------------

"rgrantz" <r_grantz@hotmail.com> wrote in message
news:39rf1eF64ojcvU1
@individual.net...
>I looked at many posts regarding linking tables or refreshing links via
> code, but none seemed to address my particular situation (which surprised
> me).
>
> I have a development PC and need to distribute a Front End/Back End db to
> several different locations. Each will have a different UNC path to their
> own shared folder in which the Back End resides. How can I pre-set the
> links with the right address before distributing the application? The end
> product FrontEnd is a .mde file with no menus, and I don't really feel
> safe
> having the users use the LTM and then create mde's themselves.
>
> Is this possible?
>
> Thanks for reading, and for any help
>
>
>



Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2008 droptable.com