Glenn-
Perhaps at some point your refresh code was just adding another Table=
instead of replacing the old one?
John Viescas, Author
Microsoft Access 2010 Inside Out
Microsoft Access 2007 Inside Out
Microsoft Access 2003 Inside Out
Building Microsoft Access Applications
SQL Queries for Mere Mortals
http://www.viescas.com/
(Paris, France)
-----Original Message-----
From: MS_Access_Professionals@yahoogroups.com
[mailto:MS_Access_Professionals@yahoogroups.com] On Behalf Of Glenn Lloyd
Sent: Wednesday, June 19, 2013 2:19 AM
To: MS_Access_Professionals@yahoogroups.com
Subject: [MS_AccessPros] corrupted connection string Access 2010 breaks
re-linking code
When I create a link to an Excel 2010 workbook, the connection string in the
tabledef for the table appears to be corrupt. Using the debugger to print
the tdf.Connect property, the first part of the string, up to the Table
appears correct. However the parameter "TABLE=tablename" repeats approx. 20
times before the string goes on to the rest of the string, DATABASE= etc.
The length of the string was 441 characters when I checked.
I was using code that relinks tables when they are in the same folder as the
frontend. The code used the existing connect string update with new path
information to update the tdf.connect before calling RefreshLink.
Now the interesting thing is that when I deleted the linked table and then
relink the same table, the new connect string was still corrupt.
I managed to overcome the error by discarding all but the table and file
name and then building the connect string from scratch. That way, I am not
propagating a corrupt connect string.
Can anyone suggest what might have created the bad string in the first
place? I have traced the code through multiple times looking for a clue but
no joy.
Glenn
[Non-text portions of this message have been removed]
------------------------------------
Yahoo! Groups Links
| Reply via web post | Reply to sender | Reply to group | Start a New Topic | Messages in this topic (2) |
Tidak ada komentar:
Posting Komentar