How to encryption/decryption algorithm for mdb table?

Reply

Join Date: Feb 2007
Posts: 2
Reputation: maharaskal is an unknown quantity at this point 
Solved Threads: 0
maharaskal maharaskal is offline Offline
Newbie Poster

How to encryption/decryption algorithm for mdb table?

 
0
  #1
Feb 14th, 2007
can anyone help me?
How to encryption/decryption algorithm for mdb table?




Private Sub cmdSearch_Click()

On Error Resume Next

HighlightText txtSearch, True

If txtSearch.Text = "" Then

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='" & txtSearch.Text & "' order by month"
Set rs = New Recordset
rs.Open sql11, con, adOpenStatic, adLockReadOnly

If rs.EOF Then


Exit Sub
Else
rs.MoveLast

Text2.Text = rs("bank")
Text3.Text = rs("date")
Text4.Text = rs("description")
Text5.Text = rs("month")


End If
For i = 1 To 5
MSHFlexGrid1.ColWidth(i) = MSHFlexGrid1.Width / 5
Next i
Set MSHFlexGrid1.DataSource = rs
MSHFlexGrid1.Visible = True
End If

' ----------------------------------------------------------------------------
Dim theList As Long
Dim textToSearch As String
Dim theListText As String
Dim salpet As String

If rs.EOF = False Then
textToSearch = LCase(txtSearch.Text & " = " & Text2.Text)
For theList = 0 To lbox.ListCount - 1
theListText = LCase(lbox.List(theList))
If theListText = textToSearch Then
salpet = "exist"
End If
Next

If salpet <> "exist" Then lbox.AddItem txtSearch.Text & " = " & Text2.Text

End If
'-> -----------------------------------------------------------------------------

End Sub


Private Sub Command1_Click()
lbox.Clear
'lbox.AddItem ""
'lbox.AddItem "Results :"
End Sub

Private Sub Command2_Click()
FollowUp.Show

End Sub

Private Sub Form_Load()
'lbox.AddItem ""
'lbox.AddItem "Results :"
End Sub


'"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""'

'Uppercase and Number only
Private Sub txtSearch_KeyPress(KeyAscii As Integer)

If IsNumeric(Chr(KeyAscii)) = False And (Not (KeyAscii > 64 And KeyAscii < 91) And Not (KeyAscii > 96 And KeyAscii < 123)) And KeyAscii <> 8 And KeyAscii <> 32 Then
KeyAscii = 0
Exit Sub
Else: KeyAscii = Asc(UCase(Chr(KeyAscii)))
End If
End Sub


' Highlight Text

Public Sub HighlightText(ctlControl As Control, Optional SetFocus As Boolean)
With ctlControl
.SelStart = 0
.SelLength = Len(.Text)

If SetFocus And .Enabled And .Visible Then
.SetFocus
End If
End With
End Sub
Private Sub txtSearch_GotFocus()
txtSearch.SelStart = 0
txtSearch.SelLength = Len(txtSearch.Text)
End Sub
Reply With Quote Quick reply to this message  
Join Date: Feb 2007
Posts: 2
Reputation: maharaskal is an unknown quantity at this point 
Solved Threads: 0
maharaskal maharaskal is offline Offline
Newbie Poster

Re: How to encryption/decryption algorithm for mdb table?

 
0
  #2
Feb 14th, 2007
Originally Posted by maharaskal View Post
can anyone help me?
How to encryption/decryption algorithm for mdb table?




Private Sub cmdSearch_Click()

On Error Resume Next

HighlightText txtSearch, True

If txtSearch.Text = "" Then

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='" & txtSearch.Text & "' order by month"
Set rs = New Recordset
rs.Open sql11, con, adOpenStatic, adLockReadOnly

If rs.EOF Then


Exit Sub
Else
rs.MoveLast

Text2.Text = rs("bank")
Text3.Text = rs("date")
Text4.Text = rs("description")
Text5.Text = rs("month")


End If
For i = 1 To 5
MSHFlexGrid1.ColWidth(i) = MSHFlexGrid1.Width / 5
Next i
Set MSHFlexGrid1.DataSource = rs
MSHFlexGrid1.Visible = True
End If

' ----------------------------------------------------------------------------
Dim theList As Long
Dim textToSearch As String
Dim theListText As String
Dim salpet As String

If rs.EOF = False Then
textToSearch = LCase(txtSearch.Text & " = " & Text2.Text)
For theList = 0 To lbox.ListCount - 1
theListText = LCase(lbox.List(theList))
If theListText = textToSearch Then
salpet = "exist"
End If
Next

If salpet <> "exist" Then lbox.AddItem txtSearch.Text & " = " & Text2.Text

End If
'-> -----------------------------------------------------------------------------

End Sub


Private Sub Command1_Click()
lbox.Clear
'lbox.AddItem ""
'lbox.AddItem "Results :"
End Sub

Private Sub Command2_Click()
FollowUp.Show

End Sub

Private Sub Form_Load()
'lbox.AddItem ""
'lbox.AddItem "Results :"
End Sub


'"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""'

'Uppercase and Number only
Private Sub txtSearch_KeyPress(KeyAscii As Integer)

If IsNumeric(Chr(KeyAscii)) = False And (Not (KeyAscii > 64 And KeyAscii < 91) And Not (KeyAscii > 96 And KeyAscii < 123)) And KeyAscii <> 8 And KeyAscii <> 32 Then
KeyAscii = 0
Exit Sub
Else: KeyAscii = Asc(UCase(Chr(KeyAscii)))
End If
End Sub


' Highlight Text

Public Sub HighlightText(ctlControl As Control, Optional SetFocus As Boolean)
With ctlControl
.SelStart = 0
.SelLength = Len(.Text)

If SetFocus And .Enabled And .Visible Then
.SetFocus
End If
End With
End Sub
Private Sub txtSearch_GotFocus()
txtSearch.SelStart = 0
txtSearch.SelLength = Len(txtSearch.Text)
End Sub
Here is the Module

'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
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC