Icon View Incident Report

Minor Minor
Reported By: Marco Rodriguez
Reported On: 9/20/2004
For: Version 4.10 Build 1
# 1843 TDBISAMFieldDefs.Insert Method Does Not Automatically Use the Next Available Field Number

The following code causes the error:

Error : 10000 invalid field definition specified for the field 'CP_PRUEBA', in the table 'CUENP_A1'.

dbisamt.Databasename:= 'd:\datos\ibsam\bancos';
dbisamt.TableName:= 'CUENP_A1';
if dbisamt.Exists then
  begin
  with dbisamt do
  begin
  fielddefs.Update;
  indexdefs.Update;
  fielddefs.insert(3,'CP_PRUEBA',ftstring,5,false);
  AlterTable(LocaleID,UserMajorVersion,UserMinorVersion,
             Encrypted,Password,Description,
             IndexPageSize,BlobBlockSize,LastAutoIncValue,
             TextIndexFields,TextIndexStopWords,
             TextIndexSpaceChars,TextIndexIncludeChars);
  end;



Comments Comments and Workarounds
The workaround is to use the version of the TDBISAMFieldDef.Insert method that allows you to specify the FieldNo for the new field, and give it a valid field number (TDBISAMTable.FieldDefs.Count+1).


Resolution Resolution
Fixed Problem on 9/20/2004 in version 4.11 build 1
Image