473,499 Members | 1,562 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Disconect linked tables opened in front end from back end with vba executed from be

22 New Member
Whew..

OK, running access 2003 in win xpsp2 and access 2007 in win vista.

This is the question...

We have a db, split in front end (FE.mdb) and backend (BE.mdb)

FE has tons of linked tables from BE.

So the question is... I want to edit the design of a table in BE, is there a way to say, break the links or connections active to the table in the backend with code executed from the backend itself.

Please do not post answers where one could have a form open at startup in hidden view in the front end linked to a table in the backend and when a value is changed in such table a modal form pops ups and after a certain time it closes access, that is not the answer i'm looking for.

I was thinking, if there is a tabledefs.connect property in the front end, is there something similar in backend, i mean, is there something like a tabledefs.connect property for tables in the backed, and if it exists, could it be set to null so to break the links in the frontends. Access knows when a table is open in front ends, but what is that property,how could one access it, and if it can me modified?

I don't mean to be rude or anything like that, but please do not post answers like "a better approach to this would be...".

Please think of this question as a proof of concept, here the mean is the important, not the end itself.

Regads,
Oct 5 '08 #1
18 4446
puppydogbuddy
1,923 Recognized Expert Top Contributor
Here are reference sources that tell what to do. The second is referenced in the first link.

http://www.granite.ab.ca/access/relinkingtables.htm

http://www.mvps.org/access/tables/tbl0009.htm
Oct 5 '08 #2
afromanam
22 New Member
Thanks for the prompt reply m8.

However, let me rephrase the question:

Can you check if a table in the BE.mdb is open in other databasese, be it in the FE or another database.

I saw the tabledefs.connect property, however that seems to work only with the linked tables on the FE.

However the question remains:

1. when someone has linked to a table in the BE and has it open in another database, you cannot edit the design of the table in the backednd. So there is a way in which Access knows that a table is open in another database.

2. Is there a way to know if a table in the BE is open in the FE without resorting to try to edit the design of the table and get the Open in Read-only mode prompt?

3. How could one break the connection or the links to the table in the backend.

Perhaps I'm not making myself clear:

Is there a way where one could have a form in the backend with a button where you could click it and it would close all the connections open on the tables in the frontend, so you could edit the designs of the tables?

I've doing some research but from what I've seen, you would have to meddle with closing transactions or closing connections, or even use ado, adodb or dao operations, and that's way over my head.

Regards,
Oct 5 '08 #3
NeoPa
32,557 Recognized Expert Moderator MVP
So, if I understand you correctly, you want to be able to determine, with the BE database open, whether or not any of its tables are currently open from elsewhere. Presumably that would include from copies of the FE as well as someone opening the BE itself somewhere else. Also, any potential solution should not include code.

Is that a fair expression of your question?
Oct 5 '08 #4
NeoPa
32,557 Recognized Expert Moderator MVP
As this doesn't quite fit that I will simply suggest it and allow you to explain that it doesn't meet your requirements...

Would trying to open BE in Exclusive mode work for you? You would immediately know if the database opened that :
  1. None of the tables is currently opened.
  2. None could be opened until you have closed BE.
Oct 5 '08 #5
ADezii
8,834 Recognized Expert Expert
Thanks for the prompt reply m8.

However, let me rephrase the question:

Can you check if a table in the BE.mdb is open in other databasese, be it in the FE or another database.

I saw the tabledefs.connect property, however that seems to work only with the linked tables on the FE.

However the question remains:

1. when someone has linked to a table in the BE and has it open in another database, you cannot edit the design of the table in the backednd. So there is a way in which Access knows that a table is open in another database.

2. Is there a way to know if a table in the BE is open in the FE without resorting to try to edit the design of the table and get the Open in Read-only mode prompt?

3. How could one break the connection or the links to the table in the backend.

Perhaps I'm not making myself clear:

Is there a way where one could have a form in the backend with a button where you could click it and it would close all the connections open on the tables in the frontend, so you could edit the designs of the tables?

I've doing some research but from what I've seen, you would have to meddle with closing transactions or closing connections, or even use ado, adodb or dao operations, and that's way over my head.

Regards,
Is there a way where one could have a form in the backend with a button where you could click it and it would close all the connections open on the tables in the frontend, so you could edit the designs of the tables?
Not at all advisable!
Oct 5 '08 #6
puppydogbuddy
1,923 Recognized Expert Top Contributor
It sounds like the free Auto FE Updater at the link shown below will accomplish most, if not all of what you are asking for.

http://www.granite.ab.ca/Access/autofe.htm


Excerpt:

The utility guarantees a consistent front end to the user. You can lock out users if there is a problem in the backend or you need to make some schema changes.
Oct 5 '08 #7
FishVal
2,653 Recognized Expert Specialist
@PDB

The utility will, if required,
.....
allow an administrator to set or remove the lockout to prevent users from starting the app.
Does that mean "Passive shutdown" - like setting "Jet OLEDB:Connection Control" property?
Or it allows to logout user already logged in?

Regards,
Fish
Oct 5 '08 #8
afromanam
22 New Member
So, if I understand you correctly, you want to be able to determine, with the BE database open, whether or not any of its tables are currently open from elsewhere. Presumably that would include from copies of the FE as well as someone opening the BE itself somewhere else. Also, any potential solution should not include code.

Is that a fair expression of your question?
M8,

Thanks again for the response,
you want to be able to determine, with the BE database open, whether or not any of its tables are currently open from elsewhere. Presumably that would include from copies of the FE as well as someone opening the BE itself somewhere else.
Yes, you are correct, it would include also databases that are not the FE and that have linked tables to the BE.

Also, any potential solution should not include code.

Is that a fair expression of your question?
Not really I guess that this request would be extremely difficult if not impossible to carry out without VBA

Would trying to open BE in Exclusive mode work for you? You would immediately know if the database opened that :

1. None of the tables is currently opened.
2. None could be opened until you have closed BE.
I agree that Exclusive mode would be the solution, however, you would need to kick out users from their FE so nobody is in when you try to edit the tables' design, that is, you could open the file exclusively but you would have to wait until all the users who have the linked table open (whether is in the FE or another DB that has a linked table to the BE) exit. So, I think -should my question have an answer- you must break links (or flush links, end transactions or however this could be done) and then you could open the BE exclusively.

Regards,
Oct 5 '08 #9
afromanam
22 New Member
It sounds like the free Auto FE Updater at the link shown below will accomplish most, if not all of what you are asking for.

http://www.granite.ab.ca/Access/autofe.htm


Excerpt:

The utility guarantees a consistent front end to the user. You can lock out users if there is a problem in the backend or you need to make some schema changes.
M8 thanks for the answer, specially on sunday!

Just picture this (becuase it has happened to me before):

maybe someone has linked to a table in the BE from a DB that is not the FE (even if you have user-level security, they just could make a simple desktop shortcut to MSACCESS.EXE and with the /WRKGROUP option set to your mdw file and make a blank DB and link to the BE tables) and voila, all of your built-in hidden forms for kicking-users out are rendered useless for that user. That is why using a hidden form with timer event solution to kick users out is not the way to go, it would have to be a solution that would close all active connections to a table in the BE, but with code executed from the BE itself.

Regards,

PS I will take a look at the FE solution you provided,
Oct 5 '08 #10
afromanam
22 New Member
Not at all advisable!

M8 thanks for the advice,

Perhaps finding out if what I'm proposing is possible for Access could be a first step, then a solution could be found where all active transactions are commited prior to closing all connections.

PS Please feel free to propose any solutions to this problem, if we start making a mess out of the BE, we can't tell we weren't warned. :)

Regards,
Oct 5 '08 #11
ADezii
8,834 Recognized Expert Expert
M8 thanks for the advice,

Perhaps finding out if what I'm proposing is possible for Access could be a first step, then a solution could be found where all active transactions are commited prior to closing all connections.

PS Please feel free to propose any solutions to this problem, if we start making a mess out of the BE, we can't tell we weren't warned. :)

Regards,
How about taking a more conservative approach, take a little time, and read the following Links:

How to Generate a User List
Passive Shutdown

P.S. - Passive Shutdown is designed to specifically limit the number of simultaneous Users that are accessing a Database, and preventing future log-ons, so that you may perform Administrative Tasks. Generating a User List to specifically see who is logged on, and Passive Shutdown to prevent further log-ons, may be a viable option (one-two punch) for you.
Oct 5 '08 #12
NeoPa
32,557 Recognized Expert Moderator MVP
I agree that Exclusive mode would be the solution, however, you would need to kick out users from their FE so nobody is in when you try to edit the tables' design, that is, you could open the file exclusively but you would have to wait until all the users who have the linked table open (whether is in the FE or another DB that has a linked table to the BE) exit. So, I think -should my question have an answer- you must break links (or flush links, end transactions or however this could be done) and then you could open the BE exclusively.

Regards,
That's not quite it, as opening in Exclusive mode fails unless the whole database is unused. If the database is in use in any way, you would need to try again later.

I would echo ADezii's comment about never force-closing a link. That really would give you more trouble than you need. I would think if you needed something more direct than the simple exclusive-mode open, then this would be your best bet.
Oct 6 '08 #13
afromanam
22 New Member
How about taking a more conservative approach, take a little time, and read the following Links:

How to Generate a User List
Passive Shutdown

P.S. - Passive Shutdown is designed to specifically limit the number of simultaneous Users that are accessing a Database, and preventing future log-ons, so that you may perform Administrative Tasks. Generating a User List to specifically see who is logged on, and Passive Shutdown to prevent further log-ons, may be a viable option (one-two punch) for you.
M8, thanks for the reply

I'm sorry I didn't look in the forum more thorughly, will do better next time.

This feature is referred to as 'Passive' since there is no way to forcibly boot Users out of a Database.
OK, well it is certainly not the answer I was hoping for, but it is indeed the answer to the question I posed.

Thank you very much
Oct 6 '08 #14
afromanam
22 New Member
That's not quite it, as opening in Exclusive mode fails unless the whole database is unused. If the database is in use in any way, you would need to try again later.

I would echo ADezii's comment about never force-closing a link. That really would give you more trouble than you need. I would think if you needed something more direct than the simple exclusive-mode open, then this would be your best bet.
M8 thanks for the reply,

I've run into situations where I had the DB open in shared mode, went into Options, checked the Open in Exclusive Mode option; that would restrict users from entering, but would not kick out users currently logged in, so I'd have to wait until everyone logged out to make changes in the design of the table, but there would be times where a user would just lock their windows session and leave the DB with the linked table open during the whole weekend! I would then via the FE try to kick everyone out, but didn't have any option when the user linked the table from a DB other than the FE.

Regards
Oct 6 '08 #15
NeoPa
32,557 Recognized Expert Moderator MVP
It seems like you now have as good (or better even) a handle on this than I do. I don't play too much in this area, but I hope you now have what you need to decide how to play it for your situation.

Best of luck and Welcome to Bytes!
Oct 7 '08 #16
puppydogbuddy
1,923 Recognized Expert Top Contributor
@PDB



Does that mean "Passive shutdown" - like setting "Jet OLEDB:Connection Control" property?
Or it allows to logout user already logged in?

Regards,
Fish
Hi Fish,
With all the messages going back and forth, I did not see your question until now.....sorry.

The truth is I don't know for sure, but I believe it would be passive shutdown because it seems to address preventing users from logging on. I provided the link on the basis of Tony Toews reputation (Access MVP,etc).....I have not personally used his Auto FE Updater.

Just curious....What is the final outcome of this thread? Is using/testing the Auto FE Updater a problem, particularly if the system is backed up first?
Oct 7 '08 #17
ADezii
8,834 Recognized Expert Expert
The way I see it is that the FE Updater is primarily a Versioning mechanism whereby Users will always have the latest version whenever a new one is rolled out. This will guarantee a consistent and Up-to-Date Front End to the user. Locking out Users is not the Primary Function.
Oct 7 '08 #18
puppydogbuddy
1,923 Recognized Expert Top Contributor
The way I see it is that the FE Updater is primarily a Versioning mechanism whereby Users will always have the latest version whenever a new one is rolled out. This will guarantee a consistent and Up-to-Date Front End to the user. Locking out Users is not the Primary Function.
Hi ADezii,

I agree with you that Locking Out Users is not the primary function, but it might be more robust than what appears at first glance......but unless we hear from somebody who has used it, we will probably never know for sure.

To see what I mean, click on the hyperlink I provided and go to the bottom of the page that comes up. There you will see more hyperlinks for more details. Click on the hyperlink named "the Utility", you will see a form and the following statement (excepted):

"If you run the utility interactively, by clicking on the StartMDB.exe from within Windows Explorer you will see an interactive form, similar to the form above, where you can validate the INI file, select the shortcut icon file and lockout or un-lockout users from your app."
Oct 7 '08 #19

Sign in to post your reply or Sign up for a free account.

Similar topics

6
6749
by: Andreas Lauffer | last post by:
I changed from Access97 to AccessXP and I have immense performance problems. Details: - Access XP MDB with Jet 4.0 ( no ADP-Project ) - Linked Tables to SQL-Server 2000 over ODBC I used...
12
2613
by: Neil | last post by:
I previously posted re. this, but thought I'd try again with a summary of facts. I have an Access 2000 MDB with a SQL Server 7 back end. There is a view that is linked to the database via ODBC...
2
4492
by: Jeff Pritchard | last post by:
Some time ago I am sure I came across something that said this was possible, though it doesn't seem to work. A client wants to replace an Access back-end with SQL Server tables. We have tried...
2
2670
by: Robert McGregor | last post by:
Hi all, I've got a Front End / Back End database that was working just fine. One day i opened the FE to find that if I tried to open one of the linked tables from the database window, nothing...
6
1830
by: RBohannon | last post by:
I'm using Access 2000. I have a DB with 19 tables, and I have just split it. When I look in the back end, all 19 tables are there. However, only 17 of them in the front end are actually linked to...
1
4295
by: Julia | last post by:
Hello there. I have a question somewhat related to this topic, and I don't know where else to go. I hope somebody can help. I've created a database in access, that I'd like to share with less...
3
2051
by: Jer | last post by:
Using Access 2003 w/Windows XP. I have a database originally created with the tables internal. I split the database into a front-end/back-end with linked tables. Now when I open one of the...
25
45681
by: bubbles | last post by:
Using Access 2003 front-end, with SQL Server 2005 backend. I need to make the front-end application automatically refresh the linked SQL Server tables. New tables will be added dynamically in...
1
15496
by: theeverdead | last post by:
Ok I have a file in it is a record of a persons first and last name. Format is like: Trevor Johnson Kevin Smith Allan Harris I need to read that file into program and then turn it into a linked...
0
7012
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7180
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7225
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
7392
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5479
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
4920
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4605
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
1429
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
307
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.