Skip to main content

AccessTr.neT


Login Giriş Sayfası Hatası

Login Giriş Sayfası Hatası

Çözüldü #1
Oluşturduğum program login formunda şu şekilde kod kullandım ama hep hata alıyorum. Yardımcı olabilirseniz sevinirim.
Private Sub OK_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles OK.Click
Dim komut As New OleDbCommand
Try
If IsDBNull(tbxsifre.Text) = False Then
Dim ds As New DataSet
komut.Connection = b
komut.CommandType = CommandType.Text
komut.CommandText = "select username_,password_ from tblusers where username_='" & cmdkullanıcı.Text & "' and password_='" & tbxsifre.Text & "'"
Dim oku As OleDb.OleDbDataReader = komut.ExecuteReader
If oku.Read = True Then
If (ds IsNot Nothing) AndAlso (ds.Tables.Count > 0) AndAlso (ds.Tables(0).Rows.Count = 1) Then
admin = CBool(ds.Tables(0).Rows(0).Item("admin"))

If admin = True Then
MsgBox("Yönetici Hoşgeldiniz" & cmdkullanıcı.Text & "!", MsgBoxStyle.OkOnly, "")
Else
MsgBox("Hoşgeldiniz" & cmdkullanıcı.Text & "!", MsgBoxStyle.OkOnly, "")
End If

giris = True
kisiid = cmdkullanıcı.Text
Me.Close()
End If
Else
MsgBox("Kullanıcı Adı veya Şifre Yanlış!", MsgBoxStyle.OkOnly, "")
giris = False
End If
End If
Catch ex As Exception
MsgBox("Hata!!!")
giris = False
End Try
End Sub

programın bir parçası ektedir......................
.rar login form.rar (Dosya Boyutu: 234,62 KB | İndirme Sayısı: 50)
Cevapla

Bir hesap oluşturun veya yorum yapmak için giriş yapın

Yorum yapmak için üye olmanız gerekiyor

ya da

Bu Konudaki Yorumlar
Login Giriş Sayfası Hatası - Yazar: ancyra - 21/08/2009, 14:10
Cvp: Login Giriş Sayfası Hatası - Yazar: cuneyt - 22/08/2009, 02:15
Cvp: Login Giriş Sayfası Hatası - Yazar: ancyra - 22/08/2009, 08:40
Task