Sorry I meant this article I was trying by Microsoft,
https://support.microsoft.com/en-gb/...nked-tables-in
I am not sure why the longer article posted by someone requires Index.
Sorry I meant this article I was trying by Microsoft,
https://support.microsoft.com/en-gb/...nked-tables-in
I am not sure why the longer article posted by someone requires Index.
I get error message on code,
CurrentDb.TableDefs.Append td
Error message, AttachedDSNLessTable encountered an unexpected error: Could not find installable ISAM.
Attached are the most important parts of my relinking code & related items.
It is used to link to both Access & SQL BEs
When I release updates to the FE, I do so via my website with all links removed
My clients download the new version and it automatically loads the relink forms & relinks the tables
As each client (in this case schools) has a different network path structure, the process allows the program admin to restore the links specific for their school.
I have no need to visit my clients sites and any support can be done by email or remote linking in using Teamviewer or similar
Most of the code is over 10 years old and hasn't been updated for a long time...but it works in both 32-bit & 64-bit Access.
I've included:
Tables - tblTableLinks & tblTableLinkTypes
Forms - frmRelinkTablesSwap / frmRelinkTables / frmRelinkTableLinkTypes
Modules - modRelinkTables/modProgressBar / modResizeForm
The form frmRelinkTablesSwap is the most important one.
This includes a button Relink All Tables (cmdRelink).
The code does several things of which the most important is the line RelinkAllTables True, True
The RelinkAllTables procedure and other supporting items such as GetConnectionString are in the module modRelinkTables
The other two modules are referenced in the code so I've included them
modProgressBar - code to create & update a progress bar
modResizeForm - code used for automatic form resizing to manage different resolutions & monitor sizes
Note that it is a small part of a large app & there may be other dependant code that I've forgotten to include.
Let me know if so.
I am aware that it won't compile as is ...
Also confession time - there are 2 table level lookups in tblTableLinks - when I wrote this back in 2008, I wasn't aware of the pitfalls of these.
I've never bothered to remove them but there's no good reason to use them!
Anyway I hope this is enough to show you how I do DSN-less connections and to help you do the same
As for your last post
I've never needed to use the code containing that procedure & have never seen that error with my approachAttachedDSNLessTable encountered an unexpected error: Could not find installable ISAM.
The only time I've ever seen the installable ISAM error was a long time ago when trying to update a linked Excel file.
That feature hasn't been allowed for over 20 years after MS lost a copyright court battle. Instead of paying to continue using the feature, they dropped it!
Hope this helps. Good luck
Last edited by isladogs; 07-19-2019 at 12:03 PM. Reason: Added attachment!
Thanks that is so awesome. It really will help. Let me check it out. 👍👍