Solved

Paradox indexes

Posted on 1998-05-13
5
348 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
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…
This is a high-level webinar that covers the history of enterprise open source database use. It addresses both the advantages companies see in using open source database technologies, as well as the fears and reservations they might have. In this…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…

691 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