Microsoft
Software
Hardware
Network
Question : Access 2007 error refreshing links to a BE with password
Hi Experts,
This is my first question so hope it's clear.
I am developing a FE/BE Access 2007 database (not upgraded) where I need to refresh the links if the BE is moved. I'm using the Dev Ashish relink code as is , and without the BE having a password it works fine.
However when I add a BE password, this is what happens:
I changed the following 2 lines of code:
Set dbLink = DBEngine(0).OpenDatabase(N
ame:=strDB
Path, Options:=False, ReadOnly:=False, Connect:=";PWD=pw")
And for the table connect:
.Connect = ";Database=" & strDBPath & ";PWD=pw;"
The following line in the code...
strDBPath = fParsePath(collTbls(i))
gives
strDBPath = "tSysMS Access;PWD=pw;DATABASE=C:\
Documents and Settings\... etc"
so when the next line executes
strTbl = fParseTable(collTbls(i))
returns table name table "tSysMS Access" not the correct table name "tSys"
Consequently, get the Err.Raise cERR_NOREMOTETABLE error.
I've thought of stripping out the "MS Access" from the table name, but suspect I've missed something else.
Can anyone suggest a solution?
Answer : Access 2007 error refreshing links to a BE with password
Replace the line
fParseTable = Left$(strIn, InStr(1, strIn, ";") - 1) to
with
fParseTable = Left$(strIn, InStr(1, strIn, ";") - 10)
to strip the MS Access off and it appears to work.
Random Solutions
Adding a unique identifier to a field for export
WIndows Vista dont boot, blue screen
Disable 'create profile' enquiry in Windows 7
the certificate is invalid for exchange server usage
How to discover the IP address of a wireless access point without looking at the DHCP client list
.NET MySQL question
TextBox and Validation Rule
FTP to unix servers from windows using VB 6.0 or Excel VBA
Need advice on approach: one recordset, or multiple recordsets?
Customizing MS Word 2007 RibbonX - ComboBox OnChange doesn't fire