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
Multiple UpDate & Select
Excel chart
How to make a windows application modal?
sql (2005) query - code to combine multiple columns into one
sharing open ports in c#
C# -- "Value==null"
How do I use validation in WPF
Use of Cards.dll in VB.NET
asp.net ..for loop - limit to reading first row of DataRow in dtVolumeOrder.Rows()
Datagrid columns are jumbled up when there are no rows (ASP.NET C#)