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;