Javier and others my approch is: 1 use DSN less connection. 2 Before you Sconnect do a test if the db is already there 3 Before you sattach do a test if the table is already attached. Normally this approach means that you never detach and disconnect unless for some reason like network failure or other misshappenings
The 2 and 3 above I have myself stolen with pride From some Razzak code (I would guess from the edge article) Gunnar Ekblad Kontema IT AB Hästholmsvägen 32 131 30 Nacka Sweden -----Ursprungligt meddelande----- Från: [email protected] [mailto:[email protected]] För Javier Valencia Skickat: den 22 mars 2011 07:08 Till: RBASE-L Mailing List Ämne: [RBASE-L] - Collecting data from an Access DB One of my clients has updated its Fuel Managements System. The system collects, among other things, odometer and hour meter every time the vehicle is fueled and also every time the vehicle drives through the gate. The most current information is kept in "vehicle" table in an Access database. The R:Base based Fleet Management System collects fuel transaction and meter information every night at midnight from a downloaded file generated by the Fuel Management System. Now, the client wants to be able to see the most recent information any time a vehicle comes in for servicing or any time the information is needed for other reason. Right now, the procedure to get the most recent odometer and meter information is: SCONNECT SATTACH vehicle table Select the information from the SATTACHED table SDETACH vehicle table SDISCONNECT The query will be run dozens of times during the day from several workstations. My questions are: Should I run the procedure outlined above every time? Since the connection is global, should I SCONNECT and SATTACH once, and leave the connection on, and have users run the SELECT query on the attached table when needed? Are there issues leaving the connection on permanently? Should I SCONNECT AND SATTACH when the first user logs into the system and SDETACH AND SDISCONNECT when the last user exist the system? Any advice, suggestion and words of wisdom will be appreciated. Javier, Javier Valencia, PE 913-829-0888 Office 913-915-3137 Cell 913-649-2904 Fax [email protected]

