Чувствительный к регистру VB 2012 с использованием msaccess
он работает нормально,но не чувствителен к регистру. пожалуйста, помогите
моя база данных выглядит так [^]
Что я уже пробовал:
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 Watermark1.Focus() Panel5.Hide() Panel13.Hide() Label7.Hide() Label8.Hide() Timer1.Enabled = False Panel8.Hide() MyConnection() 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 Username='" & Watermark1.Text & "'and Password='" & Watermark2.Text & "' ", conn) dapt.Fill(tbl) pass1 = Watermark2.Text If tbl.Rows.Count > 0 Then Timer1.Enabled = True Panel13.Show() Label7.Show() Label8.Show() Else My.Computer.Audio.PlaySystemSound( System.Media.SystemSounds.Exclamation) Panel5.Show() PictureBox2.Image = Payroll.My.Resources.Login_01error PictureBox3.Image = Payroll.My.Resources.User_Profileerror Watermark1.Focus() Watermark2.Clear() 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 Private Sub BunifuImageButton1_Click(sender As Object, e As EventArgs) Handles BunifuImageButton1.Click Me.Close() End Sub Private Sub Timer1_Tick(sender As Object, e As EventArgs) Handles Timer1.Tick loading.Value = loading.Value + 1 Label6.Text = loading.Value & "%" Label8.Text = loading.Value & "%" If (loading.Value = loading.MaximumValue) Then System.Threading.Thread.Sleep(3000) Timer1.Enabled = False Me.Hide() MainForm.Show() End If End Sub Private Sub Panel4_Paint(sender As Object, e As PaintEventArgs) Handles Panel4.Paint End Sub End Class
Mehdi Gholam
Почему вы используете StrComp ?
Member 12809194
не обращайте внимания на str comp, я забыл его удалить. не работает либо стр комп или нет