USE CONFIGU ALIAS (cAlias) NEW
AdsEnableEncryption(cPassword)
/*--------------------------------------------------------------------------
Autor : Carles Aubia
Fecha : 05.05.2011
Description : Ejemplo sencillo para testear ADS
Version Harbour : Harbour 2.1.0 (Rev.14559)
Version FWH : 11.06
---------------------------------------------------------------------------*/
#include 'fivewin.ch'
#include 'ads.ch'
#define MY_KEY 'FWH'
REQUEST ADS
REQUEST ADSKeyNo
REQUEST AdsKeyCount
REQUEST AdsGetRelKeyPos
REQUEST AdsSetRelKeyPos
FUNCTION Main()
local cAlias
local cPass := MY_KEY
local cError := ''
RddRegister("ADS",1)
RddSetDefault("ADSCDX")
SET SERVER LOCAL
USE Test NEW
cAlias := Alias()
MsgInfo( AdsVersion(), 'Version ADS' )
MsgInfo( (cAlias)->( RddName() ), 'RDD' )
if ( cAlias )->( ADSIsTableEncrypted() )
MsgInfo( 'Tabla Encriptada. Pido password' )
if ( MsgGet( 'Password', 'Clau', @cPass ) )
If (cAlias)->( ADSEnableEncryption( cPass ) ) > 0
AdsGetLastError( @cError )
MsgInfo( cError )
QUIT
endif
endif
else
MsgInfo( 'Tabla Desencriptada. La voy a encriptar' )
(cAlias)->( ADSEnableEncryption( MY_KEY ) )
(cAlias)->( ADSEncryptTable() )
endif
MsgInfo( (cAlias)->( AdsIsEncryptionEnabled() ), 'Encriptacion activada ?' )
if ( ( cAlias )->( AdsIsTableEncrypted() ) .AND. (cAlias)->( AdsIsEncryptionEnabled() ) )
(cAlias)->( XBrowse() )
endif
RETU NIL
Return to FiveWin para Harbour/xHarbour
Users browsing this forum: Carles, gmart1, Google [Bot] and 48 guests