Solved

Paradox indexes

Posted on 1998-05-13
5
340 Views
Last Modified: 2012-05-04
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 :}
0
Comment
Question by:Waldek
  • 3
  • 2
5 Comments
 
LVL 5

Expert Comment

by:JimBob091197
ID: 1345297
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
 
LVL 2

Author Comment

by:Waldek
ID: 1345298
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
 
LVL 5

Expert Comment

by:JimBob091197
ID: 1345299
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
 
LVL 2

Author Comment

by:Waldek
ID: 1345300
Ok . Fact :};]
Write answer :} if You want points :}
0
 
LVL 5

Accepted Solution

by:
JimBob091197 earned 100 total points
ID: 1345301
Hi Waldek

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

Cheers,
JB
0

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

Suggested Solutions

Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now