TCP Interface for MICRODEM--Database commands

 

These are currently not enabled.  See the separate list of working commands.

 

Command

LOAD-DB

Format

LOAD-DB|<FileName>|<display option>$

Sample

LOAD-DB|c:\mapdata\database\oef.dbf|0$

MicroDEM Response

LOAD-DB|0|OK$
Possible Error Messages

 

Notes

  1. Database will be associated with currently active DEM 1 or Image1.  If both are open, the database will be opened twice, once with each.
  2. Currently only a single database can be opened.
  3. Display options are: 0=dbasNone,1=dbasDefault,2=dbasColorField,3=dbasIHSField, 4=Icons and are normally set on the Database options tab of the Options menu choice.  This will change that default.
Command

FILTER-DB

Format

FILTER-DB|<FilterString>$

Sample

FILTER-DB|NAME=’Kabul’$
MicroDEM Response

FILTER-DB|0|OK$
Possible Error Messages

 

Notes

  1.  Causes map to be redrawn and filtered database displayed.

Command

GEO-FILTER-DB
Format

GEO-FILTER-DB|NWLat|NWLong|SELat|SELong$
Sample

GEO-FILTER-DB|45|30|15|100$
MicroDEM Response

GEO- FILTER-DB|0|OK$
Possible Error Messages

 

Notes

  1. 

 

Command

GET-RECORDS

Format

GET-RECORDS|<FileName>$

Sample

GET-RECORDS|c:\mapdata\database\oef.dbf$

MicroDEM Response

GET-RECORDS|0|<html table>$

Possible Error Messages

 

Notes

  1. Records sent as an html string
  2. Uses the currently active filters.
  3. Currently uses the previously opened database, and ignores the file name.
 
Command

GET-A-RECORD

Format

GET-A-RECORD$

Sample

GET-A-RECORD$

MicroDEM Response

GET-A-RECORD|0|<html table>$

Possible Error Messages

 

Notes

  1. Record sent as an html string
  2. Uses the previously opened database, and the current record.
  3. You should filter the DB before using this option.
Command GET-FIELD
Format GET-FIELD|<FieldName>$
Sample GET-FIELD|ADDRESS$
MicroDEM Response GET-FIELD|0|<string>$
Possible Error Messages  

Notes

  1. Uses the currently open database
  2. Records sent as a string

Command ID-DB
Format ID-DB|Lat|Long$
Sample  
MicroDEM Response ID-DB|0|<html table>$
Possible Error Messages ID-DB|-1|No records at location$
Notes

  1. Records sent as an html string
  2. Currently uses the previously opened database
  3. Must have a DEM currently opened

 

Command UNLOAD-DB
Format UNLOAD-DB$
Sample  
MicroDEM Response UNLOAD-DB|0|DB UnLoaded$
Possible Error Messages

 
Notes
  1. Closing the DEM or Image will close the databases associated with them, so this is not required.

Command ADD-RECORD
Format ADD-RECORD|<FIELD NAME=Attribute>|$
Sample ADD-RECORD|<MONTH=10>|<DAY=12>| <YEAR=2006>|$
MicroDEM Response ADD-RECORD|0|OK$
Possible Error Messages  
Notes
  1. Record added to whatever database is currently open
  2. Max of 25 fields can be added
  3. No checking that Field exists
  4. No checking of field types

Command DELETE-RECORD
Format DELETE-RECORD|<DB filter>|$
Sample DELETE-RECORD|<ID=24>|$
MicroDEM Response DELETE-RECORD|0|OK$
Possible Error Messages DELETE-RECORD|-1|Failed$
Notes
  1. Input the ID number for whatever record you want deleted
  2. Deletes record from currently open database
  3. This is implemented by using the input parameter as a filter for the database, and deleting the record  if only one record matches the Filter.

 

Command FindPlace
Format: FINDPLACE|Country_Code|Place_Name$
Sample: FIND-PLACE|FR|Aast$
MICRODEM Response: FIND-PLACE|0|43.2833333|-0.0833333$
Possible error messages:
  1. FIND-PLACE|-1|No gazetteer$
  2. FIND-PLACE|-2|No matches$
  3. FIND-PLACE|-3|8 matches$
Notes
  1. Currently works for NGA country gazetteers, which must be in c:\mapdata\gazetteer\.

 

 
Command MAKE-DROP-DOWN
Format MAKE-DROP-DOWN|<FIELD NAME>|<ControlName>$
Sample MAKE-DROP-DOWN|NAME|CDR|$
MicroDEM Response MAKE-DROP-DOWN|0|<HTML>$
Possible Error Messages  
Notes
  • Must have a DEM open, and a database.
  • Makes the HTML code for a drop down selection box.
  • Can filter the database first
  • Field Name must exist in the database
  • ControlName is the name in the HTML for the submit.
  • <select size="1"><option>Lee</option><option>Grant</option><option>Sherman</option></select><input type="submit" value="Submit" name="CDR">
 

 

Main TCP index.


Last revision 9/10/2007