EDBEngineError with message 'Index does not exist. Index:Division_ID' 
Author Message
 EDBEngineError with message 'Index does not exist. Index:Division_ID'

Hi,

I wrote a simple project with the following unit TestSetRange.pas, but
it prompted an error message - EDBEngineError with message 'Index does
not exist. Index: Division_ID' Process stopped.....on runtime and I
don't know what's happened. Anyone can help to dedug?

I place a Table object and DataSource object in which the (For Table1)
TableName property is set to Division_Table (created by using Database
Desktop); (For DataSource1) DataSet property is set to Table1.

unit TestSetRange;

interface

uses
   Windows, Messages, SysUtils, .........

type
  TForm1 = class(TForm)
     Table1: TTable;
     DataSource1: TDataSource;
     DBGrid1: TDBGrid;
     Edit1: TEdit;
     Button1: TButton;
     Button2: TButton;
     Edit2: TEdit;
     Label1: TLabel;
     Label2: TLabel;
     Table1Division_ID: TSmallintField;
     Table1Department_Name: TStringField;
     Table1Division_Name: TStringField;
     Table1Employee_Name: TStringField;
     procedure Button1Click(Sender: TObject);
     procedure Button2Click(Sender: TObject);
private
     {Private declarations}
public
     {Public declarations}
end;

var
   Form1: TForm1;

implementation

{$R *.DFM}

procedure TForm1.Button1Click(Sender: TObject);
var
   Ctrl1 : Integer;
   Ctrl2 : Integer;
   begin
   Form1.Table1.Active:=True;
   Ctrl1 := StrToInt(Edit1.Text);
   Ctrl2:=StrToInt(Edit2.Text);
   Table1.IndexName := 'Division_ID';
   Table1.SetRange ([Ctrl1],[Ctrl2]);
end;

procedure TForm1.Button2Click(Sender: TObject);
begin
   Table1.CancelRange;
end;
end.

If Anyone knows what's the problem, please tell!! Thanks a lot for
help...  : )

Queenie
17/7/97



Wed, 18 Jun 1902 08:00:00 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. 'Index is read only' - EDBEngineError

2. Paradox 'index out of date' message

3. ? Index does not exist; index: PrimaryKey

4. TQuery problem -- 'Table Does Not Exist'

5. Index does not exists

6. MSSQL6.5 Index Does not Exist

7. Index does not exist and Record/Key deleted exceptions

8. Index does not exist error

9. Index does not exist

10. Error: 'Grid Index out of range'

11. BDE error 'Index out of date'

12. DBLookupComboBox: EDBEngineError 'No Current record'

 

 
Powered by phpBB® Forum Software