Backup Error _ the Back-end File Path Not Found (1 Viewer)

June7

AWF VIP
Local time
Yesterday, 17:35
Joined
Mar 9, 2014
Messages
5,466
Guess I should have tested before questioning. It also copies file with the doubled \ in path. Tested with both FileCopy and fs.CopyFile. Also tested with computer name (UNC) and it still works. But I am not on a network.
 

Gasman

Enthusiastic Amateur
Local time
Today, 02:35
Joined
Sep 21, 2011
Messages
14,238
Guess I should have tested before questioning. It also copies file with the doubled \ in path. Tested with both FileCopy and fs.CopyFile. Also tested with computer name (UNC) and it still works. But I am not on a network.

Hi June7,

No, you were quite right to question it, I would have done the same, as I have always *thought* that sort of 'error' would not work, and generally take pains to get the backslashes correct. In this instance I played around with the code a few times and inadvertently left the extra backslash in, and have now discovered it does not matter. :D

Bit like the extra , in an IN statement "IN (21,25,23,) that still works fine without having to trim the string. Discovered that due to another thread.
 

The_Doc_Man

Immoderate Moderator
Staff member
Local time
Yesterday, 20:35
Joined
Feb 28, 2001
Messages
27,147
My money would be on the mkdir line as a folder with the filename would not exist.?

I'm risking no cash on THAT bet.
 

The_Doc_Man

Immoderate Moderator
Staff member
Local time
Yesterday, 20:35
Joined
Feb 28, 2001
Messages
27,147
Okay, on my laptop TableDefs Connect returns drive mapping, and apparently on network it returns UNC. Interesting.

Though this is not "cause and effect" it is true that when you map a drive letter to the network drive, you get a UNC path in the definition of the drive letter whereas it is possible to get a drive letter in the mapping if you were creating a named Share folder on your own system. So I think the context of creating the mapping governs the format of the stored mapping string.
 

sshafiu

Registered User.
Local time
Today, 01:35
Joined
Dec 25, 2018
Messages
13
Though this is not "cause and effect" it is true that when you map a drive letter to the network drive, you get a UNC path in the definition of the drive letter whereas it is possible to get a drive letter in the mapping if you were creating a named Share folder on your own system. So I think the context of creating the mapping governs the format of the stored mapping string.

Hi The Doc Man,

Thank you for the time you spent trying to assist me. after reading your contribution and making further research, I found other better way of resolving my issue.

By reviewing the post in this link:
https://bytes.com/topic/access/answers/953476-backup-backend-database-back-end-location
I was able to get around the problem.

Kind regards,

Shafiu.
 

sshafiu

Registered User.
Local time
Today, 01:35
Joined
Dec 25, 2018
Messages
13
Post the full Sub again please, within code tags as before.

All you should need though is

Code:
' To remove the database  & password prefix
j = InStrRev(strBackEndPath, "=") + 1
strBackEndPath = Mid(strBackEndPath, j)
strBackEndPath = left(strBackEndPath,len(strBackEndPath)-instrrev(strBackEndPath,"\")+1)
Debug.Print strBackEndPath

HTH

Dear Gasman,

Thank you for the time you spent trying to assist me. after reading your contribution and making further research, I found other better way of resolving my issue.

By reviewing the post in this link:
https://bytes.com/topic/access/answers/953476-backup-backend-database-back-end-location
I was able to get around the problem.

Kind regards,
SS.
 

Gasman

Enthusiastic Amateur
Local time
Today, 02:35
Joined
Sep 21, 2011
Messages
14,238

Users who are viewing this thread

Top Bottom