I search for "AX_SetPassword" in the forum and none came up.
So, I have to file this bug report.
I assume that this is a bug.
Below are stack trace of the bug.
Code: Select all
Description : Unable to cast object of type 'System.IntPtr' to type 'System.IConvertible'.
Subsystem : BASE
GenCode : EG_EXCEPTION Exception raised by CLR or external code
FuncSym : OOPHELPERS:SENDHELPER
Severity : ES_ERROR
Can Default : False
Can Retry : False
Can Substitute : False
Stack Trace :
at System.Convert.ToUInt32(Object value)
at XSharp.RDD.Functions.AX_GetAceTableHandle()
at XSharp.RDD.Functions.AX_SetPassword(String szEncodeKey)
I inserted this on top of my dataserver class:
Code: Select all
_DLL FUNC DBFAXSAdsEnableEncryption( hTbl AS LONGINT, pucPassword AS PSZ ) AS LONGINT PASCAL:ACE32.AdsEnableEncryption
_DLL FUNC DBFAXSAdsDisableEncryption( hTbl AS LONGINT ) AS LONGINT PASCAL:ACE32.AdsDisableEncryption
Code: Select all
PROCEDURE AX_SetPassword( szEncodeKey AS STRING ) // Set password for record encryption
IF ( IsNil( szEncodeKey ) .OR. (szEncodeKey == '' ))
DBFAXSAdsDisableEncryption( AX_GetAceTableHandle() )
ELSE
DBFAXSAdsEnableEncryption( AX_GetAceTableHandle(), String2Psz( szEncodeKey ) )
ENDIF
FUNCTION AX_GetAceTableHandle() AS LONGINT
// Returns the table handle for the current workarea. This handle can be used
// to call the Advantage Client Engine directly.
// Returns a 0 if there is a problem.
RETURN DbInfo( DBI_GET_ACE_TABLE_HANDLE )
Regards,
Rene