Drew Wutka
DWUTKA at Marlow.com
Tue Dec 11 15:15:29 CST 2007
Here's the email I sent. I just put the zip file on our new website so the link works too. download the demo I whipped up this morning. http://www.marlow.com/UDPTest.zip it's a VB project. Actually 2. Ones a client, ones a server. In the other thread, I was discussing that you could set up a VB NT Service as the 'server', and the Front End's as the 'clients'. The Front Ends can then query the server (with no hard link, the code I have in the demo 'scans' the entire subnet/LAN in a split second, and receives the response if there is an active 'server'. I suggested using this as a table linker, where the 'server' has a list of database paths, and with the correct 'prompt' from the client, it would return the correct path for that network. If you use this process in reverse, making the Front End's the 'server' (so you would have multiple servers, with one client), and make a 'control client', you could send out (from the client) a message that the servers would receive, and deal with as you wish. ie, 'ShutDownNow' or 'AskToShutDown', or 'AreYouActive'. The message would simply be sent out, and the online clients could then react to the message. No timer. Now, as an FYI, the VB projects I have in there use the Winsock OCX. For me, that is no issue at all, since I have a VB program installed on all client machines here, which uses it, so it's registered on every machine we setup here. However, I know in the pure Access world, OCX's are sometimes frowned upon due to their requirement to be set up on client machines they don't exist on. Winsock code can be done strictly through API's though, which eliminates the need for the Winsock OCX. However, and this is the catch with Access, the API's for window's sockets use the Window Messaging queue for receiving data from TCP/IP comms. To do that, you have to use callback functions. (when you subclass a form/window, to put it in the system tray, you use the windows messaging callback to determine what is happening to the icon in the system tray). Callbacks in Access 2000 and up (not sure if it is fixed in later versions of Access, I know 97 is fine, and 2000 is not, so I'm not sure if 2002 or 2003 work correctly or not....) make development a little quirky. In a finished state, there is nothing wrong. However, if a callback procedure is 'hooked', and you go into debug mode with the VBA code, you'll lock up Access 2000 (again, don't know if this is fixed with later versions). Drew -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Hale, Jim Sent: Tuesday, December 11, 2007 10:17 AM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Remote closing of Front Ends Check out this email from Drew in the archives: From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of DWUTKA at marlow.com Sent: Wednesday, August 17, 2005 4:18 PM To: accessd at databaseadvisors.com Subject: [AccessD] Force Remote Shutdown Instantly! No timers (sort of)WAS:RE: [Ac cessD] How to Manage Maintenance Mode - Auto shutdown If you can't find it I have a copy Jim Hale