LadyMarmalade
Registered User.
- Local time
- Today, 00:18
- Joined
- Sep 23, 2014
- Messages
- 26
Hi,
I have an update routine which checks the backend for any new/deleted tables.
Firstly, is there a simple way to do this? i.e. make it so that any added or deleted tables will update accordingly in all versions of the front end without needing to do it programmatically?
If not, I have an update routine - it successfully checks and updates any new tables that have appeared but I can't get it to handle deleted tables (i.e. deleting tables from front end that no longer exist in backend). I tried the following:
The issue with this is that it is slow and for some reason ignores error handling sometimes.
Is there something similar to the DCount("[Name]","MSysObjects")...I can use but on another database? I already have a backendDB Database variable if that helps.
Any suggestions? There might be a standard/accepted way to handle this that I'm not thinking of!
Thanks,
Lady Marmalade
P.S. Before you ask, I cannot fundamentally change the design of the whole thing so that users aren't generating tables. It has to be done.
I have an update routine which checks the backend for any new/deleted tables.
Firstly, is there a simple way to do this? i.e. make it so that any added or deleted tables will update accordingly in all versions of the front end without needing to do it programmatically?
If not, I have an update routine - it successfully checks and updates any new tables that have appeared but I can't get it to handle deleted tables (i.e. deleting tables from front end that no longer exist in backend). I tried the following:
Code:
For Each TB In db.TableDefs
On Error GoTo table_not_present
'Temporary tables start with ~
'All database tables have a _ in it
If TB.Connect <> "" And Not TB.name Like "~*" And TB.name Like "*_*" Then TB.RefreshLink
GoTo next_TB
table_not_present:
deleted = deleted + 1
Call DeleteTable(TB.name)
next_TB:
Next TB
The issue with this is that it is slow and for some reason ignores error handling sometimes.
Is there something similar to the DCount("[Name]","MSysObjects")...I can use but on another database? I already have a backendDB Database variable if that helps.
Any suggestions? There might be a standard/accepted way to handle this that I'm not thinking of!
Thanks,
Lady Marmalade
P.S. Before you ask, I cannot fundamentally change the design of the whole thing so that users aren't generating tables. It has to be done.