DSN / DSN-less has no impact on the connection status.
----- Original Message ----- From: "Javier Valencia" <[email protected]>
To: "RBASE-L Mailing List" <[email protected]> Sent: Thursday, March 24, 2011 12:25 AM Subject: [RBASE-L] - SV: Collecting data from an Access DB Emmitt, I will have to explore this option as it would maintain a permanent connection to the foreign database; hopefully it works with DSN-less connections. Our database default setting is STATICDB OFF. I can always create an utility that reset the connection, if necessary. Javier, Javier Valencia, PE 913-829-0888 Office 913-915-3137 Cell 913-649-2904 Fax [email protected] -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of Emmitt Dove Sent: Wednesday, March 23, 2011 4:50 PM To: RBASE-L Mailing List Subject: [RBASE-L] - SV: Collecting data from an Access DB Javier, If you SATTACH a table with STATICDB OFF and do not SDETACH it, it is always there. Any subsequent accesses of the table DO NOT REQUIRE an SCONNECT! The SCONNECT remembers the SATTACH information. We use this extensively in 7.6, whether it is the intended behavior or not. To summarize: SET STATICDB OFF SCONNECT dsnname SATTACH tablename SDISCONNECT SET STATICDB ON ... [access SATTACHED table] No issues. Now, I have not tested this with a DSN-less connection, but it certainly works with a DSN. Emmitt Dove Converting Systems Architect Evergreen Packaging, Inc. [email protected] (203) 214-5683 m (203) 643-8022 o (203) 643-8086 f [email protected] -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of Javier Valencia Sent: Wednesday, March 23, 2011 17:27 To: RBASE-L Mailing List Subject: [RBASE-L] - SV: Collecting data from an Access DB Gunnar, This is something I was considering. I will have to take a look at the code to test if the connection is on and the table attached. Most of the time I juts do: SDETACH ALL NOCHECK And then SATTACH the table. If might save time if the table is already SCONNECTED and SATTACHED. Javier, Javier Valencia, PE 913-829-0888 Office 913-915-3137 Cell 913-649-2904 Fax [email protected] -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of Gunnar Ekblad Sent: Tuesday, March 22, 2011 10:24 AM To: RBASE-L Mailing List Subject: [RBASE-L] - SV: Collecting data from an Access DB 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]

