maharaskal
Joined: 21 Dec 2006 Posts: 1
|
Posted: Thu Dec 21, 2006 3:57 am Post subject: How to Encrypt/Decrypt Database? |
|
|
Encrypt/Decrypt database
--------------------------------------------------------------------------------
how can i encrypt the database n decrypt it...
can any one help me pls????
this is the form coding....
'Made By :MahaRaskal
'emailID :maharaskal@gmail.com
Private Sub Command1_Click()
On Error Resume Next
'Text1.Text = HighLight
If Text1.Text = "" Then
'MsgBox "Please enter your Name"
Else
Dim con As Connection
Dim rs As Recordset
On Error Resume Next
Set con = CreateObject("adodb.connection")
con.Open "Driver={Microsoft Access Driver (*.mdb)};DBQ=" & App.Path & "/List.mdb;" & "Uid=myUsername;" & "Pwd=1234"
sql11 = "select * from List where PlateNo='" & Text1.Text & "' "
Set rs = New Recordset
rs.Open sql11, con, adOpenStatic, adLockReadOnly
If rs.EOF Then
'MsgBox "No Books are currently issued by you"
Exit Sub
End If
For i = 1 To 5
MSHFlexGrid1.ColWidth(i) = MSHFlexGrid1.Width / 5
Next i
Set MSHFlexGrid1.DataSource = rs
MSHFlexGrid1.Visible = True
End If
End Sub
Private Sub text1_KeyPress(KeyAscii As Integer)
KeyAscii = Asc(UCase$(Chr$(KeyAscii)))
End Sub
this is the module.....
Global sql1 As String
Sub listbooks1()
Form1.MSHFlexGrid1.Clear
Form1.MSHFlexGrid1.Visible = False
Dim con As New Connection
Dim rs As New Recordset
Set con = CreateObject("ADODB.Connection")
con.Open "Driver={Microsoft Access Driver (*.mdb)};DBQ=" & App.Path & "/List.mdb;" & "Uid=myUsername;" & "Pwd=1234"
Set rs = New Recordset
rs.Open sql1, con, adOpenDynamic, adLockReadOnly
Set Form1.MSHFlexGrid1.DataSource = rs
Form1.Frame3.Visible = True
Form1.MSHFlexGrid1.Visible = True
Form1.MSHFlexGrid1.Refresh
End Sub
list.mdb
plateno month descrp. date
WHF1998 june wira 12/08/1998
AHD2234 Feb Nissan 18/6/2002
i want the plateno n descrp. table to be encrypt / n decrypt |
|