在线等我是谁,追问access数据库加密方法。。。
'退出系统
Sub AccessFormatToMem(FileName As String)
Dim str1 As String * 12
' Open FileName For Binary Access Read As #1
' Get #1, 5, str1
' Debug.Print FileName & " " & str1 & " " & Len(Trim(str1))
' Close #1
Open FileName For Binary Access Write As #1
str1 = " " 'Standard Jet
Put #1, 5, str1
Close #1
End Sub
'进入系统
Sub MemFormatToAccess(FileName As String)
Dim str1 As String * 12
' Open FileName For Binary Access Read As #1
' Get #1, 5, str1
' 'Debug.Print str1 & " " & Len(Trim(str1))
' Close #1
Open FileName For Binary Access Write As #1
str1 = "Standard Jet " 'Standard Jet
Put #1, 5, str1
Close #1
End Sub
Private Sub Command1_Click() '运行后db1.mdb可以用access打开了
Call memformattoaccess "d:\data\db1.mdb "
End Sub
Private Sub Command2_Click() '运行后db1.mdb用access就打不开了
Call AccessFormatToMem "d:\data\db1.mdb "
End Sub
什么都不用修改。
只要在d:\data目录中建db1.mdb文件就行.
Call memformattoaccess "d:\data\db1.mdb "
Call AccessFormatToMem "d:\data\db1.mdb "
可是这两句是错误的语法啊
显示红字的
提示语法错误
我昨天就试了不行啊
谢哥们。。。。
[解决办法]
Call memformattoaccess ( "d:\data\db1.mdb ")
Call AccessFormatToMem ( "d:\data\db1.mdb ")
或者
memformattoaccess "d:\data\db1.mdb "
AccessFormatToMem "d:\data\db1.mdb "