MapBasic Program API

spatialSQL provides an interface for MapBasic programmers to load data and run queries or updates . The interface is data driven in that the interface parameters are completely defined in a   Batch SpatialSQL table.

To add a spatialSQL interface to your program, you need to add define statements to your include file.

The statement to initiate a particular button pad function is:

Run Menu Command Id spSQL_button_id

For example, to display the table1 pick dialogue:

Run Menu Command Id spSQL_TABLE1

You need to ensure that a particular pad is on display before running one of its functions:

Run Menu Command Id spSQL_GEOOP
Run Menu Command Id spSQLOP_FREE_ENDS

You also need to be aware that certain pad functions drop the pad on selection of a button. Use the interface to establish the correct order.

If you wish to toally automate the interface with no user interaction with the spatialSQL interface, you will need to use the batch dispatch table as described above. To achieve this:

  1. Use table sqlselftest.tab as a template and save a table of your name and location with the same structure.
  2. Populate the bold fields as described inBatch SpatialSQL
  3. Ensure there are no other tables of the same column structure open.
  4. If there is 1 only row in the table, this will be run. Otherwise, select the rows as jobs to be run.
  5. Run Menu Command Id spSQL_RUN_BATCH.
    spatialSQL will find a table of the correct structure as the dispatch table.
  6. See Running SpatialSQL Batch for details on reviewing and processing results.

The button identifiers that are used in spatialSQL may conflict with other MapBasic applications. If there is a conflict, you may need to temporarily stop the other application. spatialSQL ids are in the ranges 3000-3200 and 4000-4100

   
   


SpatialSQL Home
SpatialSQL Documentation Contents

Spatial Projects SQL (spatialSQL) Copyright Copyright © 2004-2006 Spatial Projects Pty Ltd  ACN 085 861 310
Names used throughout this document are trademarks of their respective companies.