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
Upgrade from MSSQL 2005 Express to MSSQL 2008 Standard
"Error 1327 Invalid Drive F:/" on Sprint USB Wireless Installation
How can I get the Start and End dates used in a seach to display on the report? MS RS 2005
In database mirroring. connection problem to failover partner when original principal is disconnectet
How to Receive the windows message DBT_DEVICEQUERYREMOVE
How do I use validation in WPF
C# -- "Value==null"
VFP 9.0 and Installshield
sql (2005) query - code to combine multiple columns into one
How to make a windows application modal?