Paradox indexes

I have a problem with Paradox indexes. I must delete all without copy table , then recreate it. I know that I can delete secondary indexes , but how I can delete primary index. I have a key field in AutoInc field , when I copy records to new table this fields has different value from first because I sometimes delete records :}
OK:} I want know how I can delete primary index in my program :}:}:} See ya :}
LVL 2
WaldekAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
JimBob091197Connect With a Mentor Commented:
Hi Waldek

If you have tested DeleteIndex for primary indeces, then you can grade this answer.

Cheers,
JB
0
 
JimBob091197Commented:
I seem to remember that if you recreate the index it overwrites the existing index.  I may be wrong, but have you tried it?

JB
0
 
WaldekAuthor Commented:
In fact its true , but I had a problem again, not till then , when I delete all indexes with database desktop problem disappear
When I use dbiRegenIndexes problem remain :}
Problem is : when user insert a new record to database (paradox , net Microsoft Network) a new record doesn't save in table , but no message , no exception) when I delete all indexes and recreate it with DBD problem disappear :} I want know how make this with code , because I don't want , that end user must uses DBD :}
0
 
JimBob091197Commented:
The help file says you can't use TTable.DeleteIndex to delete a primary index, but in fact you can.  I have just tested the following, and it works:

  tblTest := TTable.Create(Self);
  try
    tblTest.DatabaseName := 'C:\Temp\Temp';
    tblTest.TableName := 'Test';
    tblTest.DeleteIndex('');
    tblTest.AddIndex('', 'AutoField', [ixPrimary]);
  finally
    tblTest.Free;
  end;


Cheers,
JB
0
 
WaldekAuthor Commented:
Ok . Fact :};]
Write answer :} if You want points :}
0
All Courses

From novice to tech pro — start learning today.