hn4u @ Last updated 21/11/04 22:42
Go to my homepage at http://4u.jcisio.com
Full version available at http://4u.jcisio.com/r/article216.htm

Không rõ

Mở file Access 97/2.0 đã khóa security

Có nhiều trường hợp chạy không được. Vậy bạn nên copy vào máy khác sẽ được. Cho Access 2.0/97

PLEASE Do not abuse this. This should be used only for databases you originally had permissions to and forgot the password.

<#code>

Function AccessPassword(ByVal Filename As String) As String

Dim MaxSize, NextChar, MyChar, secretpos, TempPwd

Dim secret(13)

secret(0) = (&H86)

secret(1) = (&HFB)

secret(2) = (&HEC)

secret(3) = (&H37)

secret(4) = (&H5D)

secret(5) = (&H44)

secret(6) = (&H9C)

secret(7) = (&HFA)

secret( = (&HC6)

secret(9) = (&H5E)

secret(10) = (&H28)

secret(11) = (&HE6)

secret(12) = (&H13)

secretpos = 0

Open Filename For Input As #1

For NextChar = 67 To 79 Step 1

Seek #1, NextChar

MyChar = Input(1, #1)

TempPwd = TempPwd & Chr(Asc(MyChar) Xor secret(secretpos))

secretpos = secretpos + 1

Next NextChar

Close #1

AccessPassword = TempPwd

End Function

Private Sub Command1_Click()

MsgBox AccessPassword("d:\test.mdb")

End Sub


hainam4u @ Last updated 21/11/04 22:42
Go to my homepage at http://4u.jcisio.com