1

Topic: MS Access 2.0 How to replace a network database path

All I welcome.
In general, there is another's DB of the registration written under  MS Access 2.0.
The program is divided on two parts-catalogs, one directory local-user, and the second network - I think, , a DB.
For operation of a network part the network share in which the DB is laid out is created, and this resource is connected, as the network drive on all . - for example, let will be F:\<=> \\server\D\
Somewhere in a local part of a DB of the user in adjustments of properties of many tables besides a local way to a type "F:\..." The absolute UNC-way - "\\server\D\is registered...", i.e. a part of tables so, and a part - . For the author of this DB already "pies ate" so supports any are not present for a long time already generally.
I  generally especially do not know, so, on a trifle - something in properties somewhere to correct, the printer to connect/recustomize etc., to what I will guess.
And so, in connection with transfer of a network DB it is necessary to change to other computer also all UNC-ways to such tables at which the way is registered in properties through ., instead of through "F:\..."
The program is launched the local directory of a DB, type: "D:\catalog\db01.mdb", and any units-forms and other further are loaded.
After transfer of a network DB on other computer at attempt of discovery of the program the error report after a while is produced:
"Basis: SUCH THAT Oshibka:Path not found the Code: 76 Stroka:0 the Databank, possibly, has been moved to other directory. To interrupt program performance? (Yes/is not present)"
I ask the help as it to make, and that I already was worn out there to search - tables much, hands to sort out - it is possible to get under way, most likely it should any unpretentious  be made.

2

Re: MS Access 2.0 How to replace a network database path

Here the such works with 97

Public Sub RelinkTablesTo (OldFolder As String, NewFolder As String)
' RelinkTablesTo "\\server\D \", "F: \"
Dim t As TableDef
For Each t In CurrentDB.TableDefs
If t. Connect <> "" Then
Debug. Print t.name, t. Connect;
t. Connect = mReplace (t. Connect, OldFolder, NewFolder)
t. RefreshLink
Debug. Print t. Connect
End If
Next t
End Sub
Public Function mReplace (ForStr As String, s1, s2) As String
' to 2000 there is no such function
s2 = Nz (s2, "")
Dim I As Long
Dim str As String
str = ForStr
I = InStr (1, str, s1)
While I> 0
str = Mid (str, 1, I - 1) BOTH s2 AND Mid (str, I + Len (s1))
I = InStr (1, str, s1)
Wend
mReplace = str
End Function

3

Re: MS Access 2.0 How to replace a network database path

Problem also that judging by a window, there are connected dbf files

4

Re: MS Access 2.0 How to replace a network database path

Yes, then it is necessary to cause function without the last slashes

RelinkTablesTo "\\server\D", "F:"

5

Re: MS Access 2.0 How to replace a network database path

Already something appears.
Still forgot to add: after DB discovery " db01.mdb " and completions of operation of the program with the above-stated error I  on the DB which remained opened in a window " Database:... ", After, understanding unsuccessfulness of the attempts, I climbed in a file " db01.mdb " through headlights-managers directly and started to search there for substring " \\server\D\... " - those there there was a great variety. But! When I then tried to find similar tables in the DB opened already through  - I there did not find any table of those the few at which I found the full UNC-way in properties of layout! Brad any...
So, for example, by search I found a heap of the tables which names begin on "14" in a binary type, but at review of the list of tables through  - there such was not present generally! In pictures under the table " 14SA313.DBF " - I it find an example in a binary type, through  - in the list of its tables was not present.

6

Re: MS Access 2.0 How to replace a network database path

7

Re: MS Access 2.0 How to replace a network database path

And here in the Headlight a label " MAR1.dbf "

8

Re: MS Access 2.0 How to replace a network database path

And there and then it is in  (unlike "14SA313.dbf")

9

Re: MS Access 2.0 How to replace a network database path

Ur! It turned out!
In procedure " Initialization " found a place where produces the error report, on it reached a variable in which the network way is registered, further quitted on the second variable, and it already received value from the local table " ATTRIB.DBF " - here in it that and all these UNC-ways, pieces twenty have been registered. Corrected on " F: \" - and , earned!

10

Re: MS Access 2.0 How to replace a network database path

The question is solved. Warmly I thank all who responded.
The subject can be closed. Only did not find, how...