Keith - You seem to be using a workspace rather than MapBasic - either way the syntax will be the same (but in the workspace NOT in the TAB file)
Open Table MyDBMSTable Server Refresh MyDBMSTable A 'refresh' is a complete rebuild of the table by rerunning the query it is based on so you could achieve exactly the same result by using a Register Table statement in the workspace rather than Open Table. Eg (from a workspace we've been using recently) Register Table "sv_ST-FE-273-05_bc.mdb" Type ACCESS Table "SC_PARCEL" Into "SC_PARCEL_ACCESS.TAB" Open Table "SC_PARCEL_ACCESS.TAB" As SC_PARCEL_ACCESS If you are using MapBasic you can test each table the user opens to see if it is a DBMS table and then refresh it (ie switch off the default file open menu option and use a routine based on the FileOpenDlg function). HTH > Paul Crisp > Syntegra > > Direct: 0191 461 4522 > Mobile: 0776 414 3762 > Fax: (0191) 461 1959 > > Innovation Place Metro Riverside Park > Delta Bank Road Gateshead Tyne & Wear NE11 9DJ > -----Original Message----- From: Keith Miller [mailto:[EMAIL PROTECTED]] Sent: 29 May 2002 17:18 To: Mapinfo-l (E-mail) Cc: [EMAIL PROTECTED] Subject: MI-L Automatically refreshing DBMS tables I am looking for a way to automatically refresh a linked DBMS table upon opening. 1) I tried to open the DBMS table (actually an Access query) in "live access" mode (by unclicking the "Download data" button on Step 4 of 4 of the Open DBMS Table wizard), but MI complained about not having a single numeric key column (even though I tried including in the query a field called MAPINFO_ID that was an autonumber). 2) I tried putting a "server refresh myQuery" in the myQuery.TAB file, but that didn't seem to have any effect 3) I had limited success by creating a second TAB file (call it myQuery2.TAB), containing the following text: !Table !Version 100 open table "myQuery" server refresh myQuery However, this forces me to open the second table every time, and saving the workspace only saves the 'open table "myQuery"' line. I suppose I could edit all workspaces that I create to either open the myQuery2.TAB file, or insert a server refresh line, but I would like something more foolproof than that. Anyone have any hints on additional things to try? Ways to open an Access query in live access mode? The proper syntax for putting a "server refresh" line in a TAB file? Anything would be appreciated. ------------------------------------------------------------------------ Keith Miller Principal Planner: GIS and Modeling North Jersey Transportation Planning Authority, Inc. One Newark Center, 17th floor Newark, NJ 07102 973-639-8444 [EMAIL PROTECTED] --------------------------------------------------------------------- List hosting provided by Directions Magazine | www.directionsmag.com | To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] ******************************************************************** This email may contain information which is privileged or confidential. If you are not the intended recipient of this email, please notify the sender immediately and delete it without reading, copying, storing, forwarding or disclosing its contents to any other person Thank you Check us out at http://www.syntegra.com ********************************************************************
