It appears you have not yet registered with DEVPPL. To register please click here... (it's fast, easy and free!)

Forum

Log In Sponsors
Board index Programming Visual Basic Forum

How to Encrypt/Decrypt Database?

Moderator: dafunkymunky

How to Encrypt/Decrypt Database?

Postby maharaskal on Thu Dec 21, 2006 2:57 am

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
maharaskal
 
Posts: 0
Joined: Thu Dec 21, 2006 2:46 am

Who is online

Users browsing this forum: No registered users and 8 guests