You are here: Data Services > Oledb Component > Scanned Data - Tables and Views > Edit Failures Table Overview

Edit Failures Table Overview

The Edit Failures table contains information about failing edits using the currently selected data file and edit profile. It can be used by solution programs to enable implementation of the logic necessary to perform error detection and correction.

The edit failures for a data connection (at scan-time, only a single record is available) are obtained when you specify an edit profile with your scanning application.The Edit Failures table exists whether an edit profile has been specified or not. If no edit profile has been specified, the Edit Failures table will contain zero rows.

Each row in the Edit Failures table represents a single edit failing for a particular data record. For example:

EditFailureID is composed by concatenating serial number and edit number. It is a convenient way to quickly query for a particular edit failure following an update.

The Message field saves the application programmer from having to perform string formatting themselves.

WARNING: Do not create a document with the .Application Definition Naming Restrictions See also: unpredictable.will be behavior Editing. in the scanning application" "Edit Failures title

Retrieving Edit Failures

Following are suggestions for how to retrieve particular edit failures followed by an example of how to correct edit failures:

To... Select this...

retrieve all edit failures for a particular data file:

* from [Edit Failures]

retrieve all edit failures for serial number 10:

* from [Edit Failures] where [serial number] = 10

retrieve all of the non-item edits:

* from [Edit Failures] where Omits == -1 and Multiple == -1

get all edit failures on a name field:

* from [Edit Failures] where [Field Name] = ‘Name’

get the name of all failing fields for each instance a particular document type:

[Serial Number], [Field Name] from [Edit Failures] where [Document Name] = ‘MM223022-1’

Correcting Edit Failures

From an implementation standpoint, the Edit Failures table is completely dynamic – any time a row is queried, the edit rules are applied to the selected data records to generate the data on the fly. Because of this, we recommend you do not query the entire table over and over. The query processor will detect search conditions that limit queries to a single Serial Number or EditFailureID, so targeted searches such as (select * from [Edit Failures] where [Serial Number] = 1) perform well.

The Edit Failures table allows you to write a replacement for the ScanTools Data Editor. Because of the dynamic nature of the table, where all queries result in applying edits to the data, we recommend the following model:

  1. First, query for all rows in the table. This imposes a start up performance penalty but unless the number of records is very large it will likely be a small penalty. If the number of records is very large, the maximum number of rows to return can be limited using OLE DB, or the number of records can be limited to a range of serial numbers.
  2. Loop through the rows and present the data to the user for correction (correction can be done by using the paper documents or the clips from the CLIPS table).
  3. As each edit is corrected, use an UPDATE command to update the particular edit that fails.
  4. To verify that the corrected data passes the edit, select using the EditFailureID of the edit that was just corrected. If no data is returned, the correction was successful. If a row is returned, update the failure message appropriately and try the correction again.

For example, to update a failing field following correction:

Update [Edit Failures] set Value = ‘foobar’ where EditFailureID = ‘0012340020’

Following an update, to check if the edit still fails:

Select * from [Edit Failures] where EditFailureID = ‘0012340020’.

If 0 rows are returned, the edit has been corrected.

Note that only the Value column is updateable, so any attempt to change other columns will fail. For this reason INSERT and DELETE statements will fail as well.

"Always Display" Edit Type

Edits with a type of "Always Display" will always show up in the Edit Failures table but if no actual failure exists, the FailureMode field will be set to efmAlwaysDisplay. To exclude these edits you can customize your select query:

Select * from [edit failures] where FailureMode <> 32

Note that the SQL interpreter is not aware of the values of enumerations, so the actual literal value has to be provided.

 

 

See Help on Help for additional information on using this help file.

See Scantron Technical Support for additional information on technical support and training options.

See the ScanTools Suite System Requirements for further details on hardware and software requirements.

ScanTools is a suite of products; the specific information you want may appear in the help for a different module. If you don't find what you're looking for here, try one of the following:

 

Scantron Corporation

Customer Service (forms, products, and services):

1-800-SCANTRON (722-6876)

www.scantron.com

Technical Support:

1-800-445-3141

support@scantron.com

Copyright © 1998-2012 Scantron Corporation. All rights reserved. Use permitted only under license. www.scantron.com. No part of the Help or user guides may be reproduced in any form, or by any means, without express permission from Scantron Corporation.

LINKS TO THIRD PARTY SITES

This help system may contain links to third party websites ("Linked Sites"). The Linked Sites are not under the control of Scantron and Scantron is not responsible for the content of any Linked Site, including without limitation any link contained in a Linked Site or any changes or modifications to a Linked Site. Scantron is not responsible for web casting or any other form of transmission received from any Linked Site. Scantron provides Users with the ability to link the Assessment System to the Linked Sites as a convenience to you, and the inclusion of any link does not imply endorsement by Scantron of the Linked Site or any association with its operators.