?
Solved

Paradox indexes

Posted on 1998-05-13
5
Medium Priority
?
350 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 300 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

Enroll in August's Course of the Month

August's CompTIA IT Fundamentals course includes 19 hours of basic computer principle modules and prepares you for the certification exam. It's free for Premium Members, Team Accounts, and Qualified Experts!

Question has a verified solution.

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

Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…

770 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