FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour ADS Encrypted File Indexing
Posts: 3022
Joined: Fri Oct 07, 2005 01:45 PM
ADS Encrypted File Indexing
Posted: Mon Mar 09, 2015 11:38 PM

I've been using ADS ( Remote and Local ) for many years, but generally without a Data Dictionary.

First I set up the ADD and I have not problem accessing and indexing files.

However, if I encrypt a file, I get an error.

I use: oDB:createIndex( "erfcit", "city",,, .t., 10 )

Which is a call to:
METHOD createIndex( cTag, cKey, lUnique, lAscending, lMeter, nInterval, cMessage, cFor, cFor2 )
DEFAULT lUnique := .f., ;
lAscending := .f., ;
lMeter := .t., ;
nInterval := MAX( INT( ::reccount() / 10 ), 1 ), ;
cMessage := "Building index..." + cTag + STR( ::reccount( ), 12 ) + " records"
( ::cAlias )->( ORDCONDSET( cFor, cFor2,,,, nInterval, ( ::cAlias )->( RECNO() ),,,, lAscending ) )
( ::cAlias )->( ORDCREATE(, ( cTag ), cKey, { || &cKey }, ) )
RETURN nil

and the error I receive is:
Error description: Error ADSCDX/5089 The operation is not valid for the auto-open index.

I've tried some alternatives with the same result.

So if I want to use an ENCRYPTED file with ADS, using a data dictionary, how can I get the files to index ? The ONLY difference in this is if the file is encrypted. If not, the commands work perfectly. If it is, I get the error. Encryption is set using the ADS process, not called from within the program.

Tim

Tim Stone
http://www.MasterLinkSoftware.com
http://www.autoshopwriter.com
timstone@masterlinksoftware.com
Using: FWH 23.10 with Harbour 3.2.0 / Microsoft Visual Studio Community 2022-24 32/64 bit
Posts: 990
Joined: Thu Nov 17, 2005 05:49 PM
Re: ADS Encrypted File Indexing
Posted: Tue Mar 10, 2015 02:56 AM
Tim;

With auto-open indexes you will need to remove them from the data dictionary before you create another index with the same name. The right thing to do is to re-index instead of creating the index all over again but if you must create an index with the same name as an existing instead of re-indexing, then remove the index from the dd before. Like this:

Code (fw): Select all Collapse
AdsDDRemoveIndexFile( cfile, cIndexfileName, 1 )


Look for AdsDDRemoveIndexFile() ACE function on the help files. It is very well documented.

Reinaldo.

Continue the discussion