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);
       NewIndex: IDXDesc;
       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
           szName:= 'NewIndex2';
           iIndexId:= 0;
           bPrimary:= FALSE;
           bUnique:= TRUE;
           bDescending:= TRUE;
           bMaintained:= TRUE;
           bSubset:= FALSE;
           bExpIdx:= FALSE;
           iFldsInKey:= 2;
           aiKeyFld[0]:= 1;
           aiKeyFld[1]:= 2;
           bCaseInsensitive:= TRUE;
       Check(DbiAddIndex(Tbl.dbhandle, Tbl.handle, PChar(Tbl.TableName),

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