Skip to main content

AccessTr.neT


Ado İle Yapılmış Tüm özellikleri ile bir form uygulaması

Ado İle Yapılmış Tüm özellikleri ile bir form uygulaması

#18
Kod:
Option Compare Database
Option Explicit
Public conn As ADODB.Connection
Public rst As ADODB.Recordset


Private Sub Form_Load()
Set conn = CurrentProject.Connection
Set rst = New ADODB.Recordset
Me.error.Visible = False
End Sub

Private Sub iesire_Click()
Application.Quit
End Sub


Private Sub intrare_Click()
If IsNull(Me.nume) Or Me.nume = "" Then
    Me.error.Visible = True
    MsgBox "Greşit nume "
    Error_ = True
End If
If IsNull(Me.parola) Or Me.parola = "" Then
    Me.error.Visible = True
    MsgBox "Greşit parola "
    Error_ = True
End If

If Error_ = False Then
    strSql = "SELECT DISTINCT nume FROM `agentii` WHERE nume=" & Me.nume & " and parola=" & Me.parola
    rst.Open strSql, CurrentProject.Connection, adOpenStatic, adLockReadOnly
    If rst.RecordCount = 1 Then
        MsgBox "ok"
    Else
        MsgBox ":("
    End If
  
    
    Me.error.Visible = False
End If


End Sub

bu kodu çalıştırdığımda hep hata alıyorum acaba nerede hata yapıyorum Img-cray
acces ve vbde yeniyimde [/align]
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
Cvp: Ado İle Yapılmış Tüm özellikleri ile bir form uygulaması - Yazar: candasm - 21/05/2009, 03:26