IndexDefs.Add('Help','Please',[ixD2WorksGreat, ixD3Errors]) 
Author Message
 IndexDefs.Add('Help','Please',[ixD2WorksGreat, ixD3Errors])

I've got a strange problem when I create a table at runtime....Before
installing delphi 3 and the next version of BDE, the following code works
like a charm.

With FTable Do begin
     DatabaseName := FDestinationPath;
     TableName := NewTableName;
     TableType := ttDbase;
     FieldDefs.Clear;
     IndexDefs.Clear;

     {Define the Field Definition and Index Definition for the new Database
Table}
     for i := 0 To FKeys.Count - 1 Do begin
        key := FKeys.strings[i];
        if FieldDefs.IndexOf(Key) < 0 Then begin
           FieldDefs.Add(Key, ftString, 50, False);
           if i=0 then
              IndexDefs.Add('Primary', Key, [ixPrimary, ixDescending])
           else
              IndexDefs.Add(Key, Key, [ixDescending]);
        end;
     end;
     FieldDefs.Add('Data', ftMemo, 240, False);  {** Memo **}
     {Create the bastud!}
     CreateTable;
  end;

However,
after I install Delphi 3 and the new BDE, AND
whether or not I use D2 or D3 to compile this code,
the FTable.CreateTable method errors with the following error message:

"Project prcg_abw.exe raised exception class EDBEngineError with message
'Invalid Index Descriptor.  File:  Archive.__X'. Process stopped.  Use Step
or Run to continue."

The names of the indexes that are being created are "Name", "Claim", "SSN"
respectively.

Did I miss something in Delphi 3's release notes about a change in how BDE
handles Index Definitions b/c this is ridiculous?!? Your help would greatly
be appreciated otherwise I will have to uninstall D3 and reinstall D2 just
to compile this application <which I've done once already>.

Trex.Free;



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

 Relevant Pages 

1. More noob help needed please: 'asm'

2. Please Help: Duplicate DatabaseName : 'xxxx' error

3. type field ''money''

4. Add a Field 'User' or 'Value' with SQL

5. Please get me started with 'SUBSTRING()'

6. 'Incompatible types 'string' and 'Tdbedit''

7. Replace 'keystack''

8. Don't trust in 'trunc'

9. Help!: 'Invalid variable reference'

10. Help: 'External Exception C000001D'?

11. Help 'Table is busy'

12. Help with 'Hide cursor'

 

 
Powered by phpBB® Forum Software