dbiAddIndex Problem - 2nd Post

I have tried to use a routine that Borland added on their web site
using  the dbiAddIndex routine to create a secondary index on two
fields, one is ascending and the other is descending.  The problem is
when I run the program, it gives me an invalid handle to function error
message.  Any idea on what could be causing the problem?  This is the
routine, before calling it I have opened the table in exclusive mode:

     Procedure fDbiAddIndexAscDesc(Tbl: TTable);
     var
       NewIndex: IDXDesc;
     begin
       FillChar(NewIndex, SizeOf(NewIndex), 0);
       if Tbl.Exclusive = False then
         raise EDatabaseError.Create
         ('TTable.Exclusive must be set to true in order to add an index

to the table');
       with NewIndex do
         begin
           szName:= 'NewIndex2';
           iIndexId:= 0;
           bPrimary:= FALSE;
           bUnique:= TRUE;
           bDescending:= TRUE;
           bMaintained:= TRUE;
           bSubset:= FALSE;
           bExpIdx:= FALSE;
           iFldsInKey:= 2;
           aiKeyFld[0]:= 1;
           aiKeyFld[1]:= 2;
           abDescending[0]:=FALSE;
           abDescending[1]:=TRUE;
           bCaseInsensitive:= TRUE;
         end;
       Check(DbiAddIndex(Tbl.dbhandle, Tbl.handle, PChar(Tbl.TableName),

               szParadox, NewIndex, nil));
     end;  // fDbiAddIndexAscDesc