Backup Error _ the Back-end File Path Not Found

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.
 
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.
 
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.
 
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.
 
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.
 
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.
 

Users who are viewing this thread

Back
Top Bottom