| | |
How to encryption/decryption algorithm for mdb table?
![]() |
•
•
Join Date: Feb 2007
Posts: 2
Reputation:
Solved Threads: 0
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
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
•
•
Join Date: Feb 2007
Posts: 2
Reputation:
Solved Threads: 0
•
•
•
•
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
'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
![]() |
Similar Threads
- Java Encryption and Decryption (Java)
- its'surgent? encryption in jsp (JSP)
- Password encrypt/decrypt (Java)
- Encryption/Decryption in LC-3, need some help (Assembly)
- ENCRYPTION AND DECRYPTION - How to disable the File menu in a Notepad or any file (VB.NET)
- Encryption of numbers.... (C)
- Encryption -- Custom algorithm (Java)
- Copying table from one mdb to another (ASP)
Other Threads in the Visual Basic 4 / 5 / 6 Forum
- Previous Thread: how can I fix two child windows in a mdi form in vb 4
- Next Thread: Vba Excellence Needed..... Please??
| Thread Tools | Search this Thread |
* 6 429 2007 access activex add age application basic beginner birth bmp calculator cd cells.find click client code college component connection connectionproblemusingvb6usingoledb copy creat ctrl+f data database datareport date delete dissertations dissertationthesis dissertationtopic edit error excel excelmacro file filename form hardware header iamthwee image inboxinvb internetfiledownload keypress label listbox listview liveperson login looping machine microsoft movingranges number objectinsert open oracle password prime program prompt range-objects readfile reading record refresh remotesqlserverdatabase report save search sendbyte sites sort sql sql2008 sqlserver subroutine tags textbox time urldownloadtofile vb vb6 vb6.0 vba visual visualbasic visualbasic6 web window windows





