Antonio:
Marc pointed out the correct syntax via the USE filename VIA SIX PASSWORD "mypassword" (password cannot be greater than 8 chars).
Also this is correct:
- Code: Select all Expand view
USE filename VIA SIX
Sx_SetPass("mypassword") // this sets the password for the current workarea, can be used to change the default password for a DBF
When storing data there's nothing new to do:
- Code: Select all Expand view
REPLACE Field1 WITH cChar, Field2 WITH dDate, etc.
And the record is stored in encrypted form.
The DOS/Clipper 5.2e Six driver changes the byte that defines the presence or not of a memo field in the DBF header as follows:
1. CHR(6) - encrypted table (no Memo field)
2. CHR(134) - encrypted table with memo file (.DBT) DBFNDX driver CHR(131) - NO encryption
3. CHR(230) - encrypted table with memo file (.SMT) SIXNSX driver CHR(229) - NO encryption
4. CHR(246) - encrypted table with memo file (.FPT) SIXCDX driver CHR(245) - NO encryption
On the link you provided the PRG is using DBFNSX as the driver. On xHarbour the driver is SIX. Also the person is migrating from 16 bit. Under 16 bit you can define the default block size for memo fields. Maybe that's the cause for data corruption. I think that you, as our guru, should test it with a small program.
Thank you Antonio.