Click here to Skip to main content
16,004,991 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: Access Pin
Kschuler24-Sep-07 4:01
Kschuler24-Sep-07 4:01 
GeneralRe: Access Pin
mcbunnell24-Sep-07 6:53
mcbunnell24-Sep-07 6:53 
GeneralRe: Access Pin
Kschuler24-Sep-07 8:02
Kschuler24-Sep-07 8:02 
AnswerRe: Access Pin
Dave Kreskowiak24-Sep-07 5:01
mveDave Kreskowiak24-Sep-07 5:01 
GeneralRe: Access Pin
mcbunnell24-Sep-07 6:52
mcbunnell24-Sep-07 6:52 
GeneralRe: Access Pin
nlarson1124-Sep-07 7:37
nlarson1124-Sep-07 7:37 
GeneralRe: Access Pin
Dave Kreskowiak24-Sep-07 7:57
mveDave Kreskowiak24-Sep-07 7:57 
AnswerRe: Access Pin
parth.p25-Sep-07 12:30
parth.p25-Sep-07 12:30 
What you can possibly do is to connect to the data base using ADODB and create a loop which searchs for username and password in access file.


Private Sub SubmitButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles SubmitButton.Click
Dim con As New ADODB.Connection
        Dim rs As New ADODB.Recordset

        With con
            .Provider = "Microsoft.Jet.OLEDB.4.0"
            .Open("db1.mdb")
        End With

        rs.Open("Select * from Table1", con, ADODB.CursorTypeEnum.adOpenDynamic, ADODB.LockTypeEnum.adLockOptimistic)

        Dim pSn As Boolean
        Dim uNme As String

        unme = StrConv(UsernameTextBox.Text, VbStrConv.ProperCase)

        rs.MoveFirst()

        Do While Not rs.EOF
            If unme = rs(0).Value And PasswordTextBox.Text = rs(1).Value Then
                MsgBox("User name and Password Accepted", MsgBoxStyle.Information)
                Me.Hide()
                Form1.Show()
                pSn = True
        Exit Do
            Else
                rs.MoveNext()
                pSn = False
            End If
        Loop

        If pSn = True Then

        ElseIf pSn = False Then
            MsgBox("The username or password is incorrect. Please retype the Username and password.", MsgBoxStyle.Exclamation, "Login")
            UsernameTextBox.Clear()
            PasswordTextBox.Clear()
            UsernameTextBox.Focus()
        End If

End Sub

Parth Patel Wink | ;)
QuestionDatabase Pin
vidya11024-Sep-07 1:55
vidya11024-Sep-07 1:55 
AnswerRe: Database Pin
pmarfleet24-Sep-07 2:18
pmarfleet24-Sep-07 2:18 
AnswerRe: Database Pin
originSH24-Sep-07 3:14
originSH24-Sep-07 3:14 
AnswerRe: Database Pin
helelark12324-Sep-07 4:37
helelark12324-Sep-07 4:37 
QuestionConcurrency Violation: the update command affected 0 of the expected 1 records.? Pin
Mr Oizo24-Sep-07 0:42
Mr Oizo24-Sep-07 0:42 
AnswerRe: Concurrency Violation: the update command affected 0 of the expected 1 records.? Pin
GuyThiebaut24-Sep-07 1:46
professionalGuyThiebaut24-Sep-07 1:46 
GeneralRe: Concurrency Violation: the update command affected 0 of the expected 1 records.? Pin
Mr Oizo24-Sep-07 4:49
Mr Oizo24-Sep-07 4:49 
GeneralRe: Concurrency Violation: the update command affected 0 of the expected 1 records.? Pin
Dave Kreskowiak24-Sep-07 4:56
mveDave Kreskowiak24-Sep-07 4:56 
AnswerRe: Concurrency Violation: the update command affected 0 of the expected 1 records.? Pin
Dave Kreskowiak24-Sep-07 4:12
mveDave Kreskowiak24-Sep-07 4:12 
GeneralRe: Concurrency Violation: the update command affected 0 of the expected 1 records.? Pin
Mr Oizo24-Sep-07 5:04
Mr Oizo24-Sep-07 5:04 
GeneralRe: Concurrency Violation: the update command affected 0 of the expected 1 records.? Pin
GuyThiebaut24-Sep-07 5:24
professionalGuyThiebaut24-Sep-07 5:24 
GeneralRe: Concurrency Violation: the update command affected 0 of the expected 1 records.? Pin
Mr Oizo24-Sep-07 6:47
Mr Oizo24-Sep-07 6:47 
GeneralRe: Concurrency Violation: the update command affected 0 of the expected 1 records.? Pin
GuyThiebaut24-Sep-07 8:14
professionalGuyThiebaut24-Sep-07 8:14 
Questionhow to create dynamic textbox object [modified] Pin
moomoooomoo24-Sep-07 0:13
moomoooomoo24-Sep-07 0:13 
AnswerRe: how to create dynamic textbox object Pin
Ajay.k_Singh24-Sep-07 0:39
Ajay.k_Singh24-Sep-07 0:39 
GeneralRe: how to create dynamic textbox object Pin
moomoooomoo24-Sep-07 0:51
moomoooomoo24-Sep-07 0:51 
QuestionByte to IntPtr Pin
nitin323-Sep-07 23:59
nitin323-Sep-07 23:59 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.