Personal tools
You are here: Home "Save Workspace As" Bug
BugList >>

"Save Workspace As" Bug

Document Actions
last edited 2 years ago by BillThoen

The Save Workspace As command fails if there is a query to store in the workspace. (MapInfo bug #11300.)

If you execute the Save Workspace As filename.WOR statement and there is a query to be saved and the preference to save queries in workspaces is set to on, the error message "Unable to save workspace" will appear and your program will crash. This bug exsists in MapBasic version 5.5 through 8.0.

Example:

  Dim sWorfile as String

Open Table "States.TAB" Interactive Select * from States Where CentroidX(obj) < -96.0 Into WesternStates Map from WesternStates sWorfile = FileSaveAsFlg ("", "*.WOR", "WOR", "Save wworkspace as:")

Save Workspace As sWorfile

The workaround is to execute the command with the Run Command statement:
  Dim sWorfile as String
  Dim sCmd as String  

Open Table "States.TAB" Interactive Select * from States Where CentroidX(obj) < -96.0 Into WesternStates Map from WesternStates sWorfile = FileSaveAsFlg ("", "*.WOR", "WOR", "Save wworkspace as:")

sCmd = "Save Workspace As """ + sWorfile + """" Run Command sCmd

« December 2008 »
Su Mo Tu We Th Fr Sa
1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30 31
 

Powered by Plone, the Open Source Content Management System

This site conforms to the following standards: