If ( nHandle := FOpen( "MGFCES.DBF", 2 ) ) >= 0
FSeek( nHandle, 0, 0 )
FWrite( nHandle,Chr( 4 ), 1 )
FClose( nHandle )
FRename( "MGFCES.DBF", "MGFCES.ABC" )
EndIf
mmercado wrote:Hi Otto:
There was an old trick in Clipper to hide dbfs to programs, it consisted in changing the first byte of dbf file (dbf file's first byte is always Chr(3)), something like this:
- Code: Select all Expand view
If ( nHandle := FOpen( "MGFCES.DBF", 2 ) ) >= 0
FSeek( nHandle, 0, 0 )
FWrite( nHandle,Chr( 4 ), 1 )
FClose( nHandle )
FRename( "MGFCES.DBF", "MGFCES.ABC" )
EndIf
Then when you wanted to use the dbf again, just restored the first byte to Chr(3)
Regards
Manuel Mercado
xProgrammer wrote:Another idea is to make them hidden files. What the snooping Excel user doesn't see he possibly won't fiddle with. Just a thought.
xProgrammer
Value Attribute
0 Normal
1 Read only
2 Hidden
4 System
8 Volume
32 Archived
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: No registered users and 82 guests