Accessing files encrypted with Cryptor during design time


Author
Message
AlexSosa
AlexSosa
StrataFrame Beginner (43 reputation)StrataFrame Beginner (43 reputation)StrataFrame Beginner (43 reputation)StrataFrame Beginner (43 reputation)StrataFrame Beginner (43 reputation)StrataFrame Beginner (43 reputation)StrataFrame Beginner (43 reputation)StrataFrame Beginner (43 reputation)StrataFrame Beginner (43 reputation)
Group: Forum Members
Posts: 35, Visits: 138
We use Cryptor to keep dbfs encrypted in disk.  With the VFP code below we can access those encrypted tables via VfpOleDb.

Fast forward to Strataframe.  I need to access those tables from Strataframe both at runtime and at design time.  Runtime seems straightforward (though I haven't done it yet Smile ), but where would you place the equivalent code in the development environment so that the BO mapper can access the encrypted dbf?

Thanks,

Alex

CLOSE ALL

* Instantiate Cryptor and tell it to watch disk access by oledb32.dll

poCryptor = CreateObject("XitechCryptor.Cryptor")

poCryptor.WatchDLL("oledb32.dll")

* Register table plemp.dbf with Cryptor as encrypted

MyCryptor('plemp.dbf')

* Access plemp.dbf via vfpoledb

LOCAL oConn as "adodb.connection"

LOCAL oRS as "adodb.recordset"

oConn = CREATEOBJECT('adodb.connection')

oRS = CREATEOBJECT('adodb.recordset')

cConnStrng = "Provider=vfpoledb;Data Source=" + "z:\VPay950\Contab\sosa"

oConn.Open(cConnStrng)

oRS = oConn.Execute("SELECT * FROM plemp")

?oRS.Fields("ccodemp").Value

oRS.Close()

oConn.Close()

FUNCTION MyCryptor

PARAMETER tcFile

lcPassword = 'password'

lnAlgorithmNumber = xxx

poCryptor.Register(tcFile,lcPassword,lnAlgorithmNumber)

RETURN


GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...





Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search