View Single Post
  #5 (permalink)  
Old November 27th, 2016, 02:47 AM
Yuanne Yuanne is offline
Registered User
Points: 3, Level: 1
Points: 3, Level: 1 Points: 3, Level: 1 Points: 3, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Nov 2016
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Case Sensitive VB using Ms Access

Please help my password is not case sensitive i dont know how to fix

here's my code:

Imports System.Data.OleDb
Public Class loginmain
Private conn As OleDbConnection
Private dapt As OleDbDataAdapter

Private Sub MyConnection()
conn = New OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0 ;Data Source=" & Application.StartupPath & "\Data.accdb")
conn.Open()


End Sub
Private Sub loginmain_Load(sender As Object, e As EventArgs) Handles MyBase.Load
Panel5.Hide()
Watermark1.Focus()
Panel8.Hide()

End Sub
'form close
Private Sub MyForm_Closing(ByVal sender As System.Object, ByVal e As System.Windows.Forms.FormClosingEventArgs) Handles Me.FormClosing
If MessageBox.Show(" Are you sure you want to quit?", " ", MessageBoxButtons.YesNo, MessageBoxIcon.Warning) <> DialogResult.Yes Then
e.Cancel = True
End If
End Sub
'PREVENT FLICKERING
Protected Overloads Overrides ReadOnly Property CreateParams() As CreateParams
Get
Dim cp As CreateParams = MyBase.CreateParams
cp.ExStyle = cp.ExStyle Or 33554432
Return cp
End Get
End Property
Private Sub PreVentFlicker()
With Me
.SetStyle(ControlStyles.OptimizedDoubleBuffer, True)
.SetStyle(ControlStyles.UserPaint, True)
.SetStyle(ControlStyles.AllPaintingInWmPaint, True)
.UpdateStyles()
End With

End Sub

Private Sub BunifuTileButton1_Click(sender As Object, e As EventArgs) Handles loginbutton.Click
Dim pass1 As String

Dim tbl As New DataTable
MyConnection()
dapt = New OleDbDataAdapter("Select * from UserAccount Where StrComp Username='" & Watermark1.Text & "'and Password='" & Watermark2.Text & "' ", conn)
dapt.Fill(tbl)

pass1 = Watermark2.Text
If tbl.Rows.Count > 0 Then
splash.Show()
Me.Hide()

Else

My.Computer.Audio.PlaySystemSound(
System.Media.SystemSounds.Exclamation)


Watermark1.Focus()
Panel5.Show()
PictureBox2.Image = Payroll.My.Resources.Login_01error
PictureBox3.Image = Payroll.My.Resources.User_Profileerror





End If
End Sub



Private Sub PictureBox4_Click(sender As Object, e As EventArgs) Handles PictureBox4.Click

End Sub

Private Sub Watermark1_TextChanged(sender As Object, e As EventArgs) Handles Watermark1.TextChanged
Panel5.Hide()

PictureBox3.Image = Payroll.My.Resources.User_Profile1

End Sub

Private Sub Watermark2_TextChanged(sender As Object, e As EventArgs) Handles Watermark2.TextChanged
Panel5.Hide()
PictureBox2.Image = Payroll.My.Resources.password
End Sub

Private Sub LinkLabel1_LinkClicked(sender As Object, e As LinkLabelLinkClickedEventArgs) Handles LinkLabel1.LinkClicked

ResetForm.ShowDialog()

End Sub

Private Sub LinkLabel2_LinkClicked(sender As Object, e As LinkLabelLinkClickedEventArgs) Handles LinkLabel2.LinkClicked
ResetForm.ShowDialog()
End Sub

Private Sub LinkLabel3_LinkClicked(sender As Object, e As LinkLabelLinkClickedEventArgs) Handles LinkLabel3.LinkClicked
Panel8.Show()
Panel11.Hide()

End Sub

Private Sub BunifuTileButton1_Click_1(sender As Object, e As EventArgs) Handles RegBtn.Click

End Sub
End Class
Reply With Quote