Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Password protect DBF
Message
De
08/05/2007 21:05:20
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
01222940
Message ID:
01223656
Vues:
16
You can use things like cryptor, or you can actually use the DBC to check for a password when a particular table is accessed.

See below:
Procedure dbc_BeforeOpenTable(cTableName)
*Just before a table or view is opened. Return .F. to prevent table or view being opened.
If Atc("user_info",cTableName)#0
	On Error Do ermsg
	If m.sysrunning = .T.
	On Error
		RETURN .t.
	ELSE
	 Messagebox('This table may not be accessed from outside the Service Software',48,'Nice Try')
	If Atc("user_info",cTableName)#0 And Upper(Alltrim(Inputbox('Enter Password','Password Required')))#"mwpassword"
	Return .F.
	Endif
Endif
Endif

Endproc
Rich
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform