Board index » off-topic » AddIndex()
|
Jonas
Delphi Developer |
|
Jonas
Delphi Developer |
AddIndex()2003-11-21 07:34:43 AM off-topic1 Heeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeelp me please!!!!!!!!!!! why cannot I create an index with mult fields via database desktop to a DBFIII and I cannot do the same at run time? What am I doing wrong? here is what I am trying to do: CDRTable.AddIndex('CDRDate.NDX', 'DATE;COUNTRY;ORIGIN', [ixExpression]); Thanks. Jonas |
| Jonas
Delphi Developer |
2003-11-21 08:06:43 AM
Re:AddIndex()
You are the best Bill! Thanks a lot!!!
Jonas "Bill Todd" < XXXX@XXXXX.COM >wrote in message QuoteSee community.borland.com/article/0,1410,15868,00.html |
| Jonas
Delphi Developer |
2003-11-21 09:41:33 PM
Re:AddIndex()
Hey guys!
I did as in Borland documentation 'dBASE Expression Indexes: A Primer - by Borland Developer Support Staff Technical Information Database' but i an getting the error message: 'Index does not exist. File: D:\Applic\Nuera\Data\CDR.MDX' here is my code: with CDRTable do begin DatabaseName := sPath; TableName := 'CDR'; TableType := ttdBASE; AddIndex('CDRDate', 'DATE + COUNTRY + ORIGIN', [ixExpression]); end; What ma I doing wrong? Thanks. Jonas "Jonas" < XXXX@XXXXX.COM >wrote in message QuoteHeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeelp me please!!!!!!!!!!! {smallsort} |
| Rick Carter
Delphi Developer |
2003-11-22 02:23:22 AM
Re:AddIndex()
"Jonas" < XXXX@XXXXX.COM >wrote:
Quotebut i an getting the error message: 'Index does not exist. File: file rather than an .NDX file. If you don't need to keep the file in the dBASE III format, you may want to just upgrade it in Database Desktop and let it work with the .MDX file, since the BDE seems to work better with those indexes. If you need to have an .NDX index and a dBASE 3 table, I suppose you could try setting your DBASE table level to 3 in the BDE Administrator and see if that helps. Please post your question once, rather than starting multiple message threads! Rick Carter XXXX@XXXXX.COM Chair, Paradox/Delphi SIG, Cincinnati PC Users Group |
| Jonas
Delphi Developer |
2003-11-22 04:07:42 AM
Re:AddIndex()
No, I don't mind using .MDX.
I have found the problem but I don't know how to solve it at runtime. Here is what I found: At runtime my application created the CDR.MDX file. I delete that file, and run my application to recreate the same file "CDR.MDX", but it gives me the message "Index does not exist. File: D:\Applic\Nuera\Data\CDR.MDX", then I opened the .DBF file and saved the structure again and I was able to regenerate the .MDX file. My questing is: How can I remove the index at runtime? Thanks. Jonas " "Rick Carter" < XXXX@XXXXX.COM >wrote in message Quote
|
| Rick Carter
Delphi Developer |
2003-11-25 12:44:15 AM
Re:AddIndex()
"Jonas" < XXXX@XXXXX.COM >wrote:
QuoteHere is what I found: At runtime my application created the CDR.MDX file. I want to delete the index directly. If you have exclusive access to the table, you should be able to use TTable.DeleteIndex. Rick Carter XXXX@XXXXX.COM Chair, Paradox/Delphi SIG, Cincinnati PC Users Group |
