Layer Must Be In Normal I/O Mode For Queries

FDO SDK

 
Layer Must Be In Normal I/O Mode For Queries
 
 
 

If you get the following FdoException stack during a Select (query) operation, you should use the ArcSDE sdelayer command to determine the I/O mode of the ArcSDE table that you are querying.

  • Unexpected error while manipulating an ArcSDE SE_QUERYINFO object. (top of GisException stack)
  • Layer is in load-only mode, operation not allowed (-77). (bottom of FdoException stack.

An ArcSDE table (or more specifically, an ArcSDE layer) can be in one of two I/O modes: “load-only” or “normal”. In load-only mode, you can insert and update data but not query it. In normal I/O mode, you can perform all commands. The purpose of load-only mode is to improve performance when doing bulk-loading of geometric data. By switching to load-only mode, you avoid dropping and creating the spatial index after every insert or update. Setting the I/O mode to load-only causes the spatial index to be dropped. Setting the I/O mode back to normal after the inserts and updates are finished causes the spatial index to be recreated.

To discover the I/O mode of a layer, use the sdelayer command. An example is sdelayer -o describe -l tablename, layername -u username -p password where layername is the name of the table column containing the feature geometry. In the output of the command there will be an “I/O Mode” field that will be either NORMAL or LOAD.

If you find that the “I/O Mode” is LOAD, you can change it to NORMAL by using the following form of the sdelayer command: sdelayer -o normal_lo -l tablename, layername -u username -p password.