Is it possible to rename the dbf files to something else. Only to obscure the database format you use.
example: customer.dbf customer.abc
Regards,
Otto
Is it possible to rename the dbf files to something else. Only to obscure the database format you use.
example: customer.dbf customer.abc
Regards,
Otto
Otto,
Yes, you can open them using the extension that you want or use RddInfo( RDDI_TABLEEXT, ".abc" ) so it will be used by default.
The above method may be better.
But you can also simply open the file with extention
example:
USE CUSTOMER.ABC
But you should use the extention every where you open the table.
Thank you.
Maybe this way you can keep off EXCEL user opening important files.
Regards,
Otto
If ( nHandle := FOpen( "MGFCES.DBF", 2 ) ) >= 0
FSeek( nHandle, 0, 0 )
FWrite( nHandle,Chr( 4 ), 1 )
FClose( nHandle )
FRename( "MGFCES.DBF", "MGFCES.ABC" )
EndIfAlways beware of Excel user, particularity if he is knowledgeable. Excel is so powerful that he can see and tinker with any RDMS ( oracle, mssql ) if he knows the passwords. ADS is, in a way, better. We can hide the folder to all except ADS. Still he can break through if ADS OLEDB is installed.
One of the aspects of database management is to keep it safe from hackers and this is another art / science.
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: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
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
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
To all,
Thank you for your help and suggestions.
Question:
Is there a function to hide files?
Regards,
Otto
Value Attribute
0 Normal
1 Read only
2 Hidden
4 System
8 Volume
32 ArchivedxProgrammer, thank you for your help.
Do you use xHarbour?
Regards, Otto
Otto
SETFILEATTRIBUTES(yourfilename, FILE_ATTRIBUTE_NORMAL )
DLL32 FUNCTION SETFILEATTRIBUTES(cFileName AS LPSTR, nFileAttributes AS DWORD ) ;
AS BOOL PASCAL FROM "SetFileAttributesA" LIB "Kernel32.dll"
Hth
Richard
Richard, thank you.
Regards,
Otto