Click here to Skip to main content
15,891,316 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

I am facing a error "There is no row at position 1"


Here is the code:


VB
Private Sub cmdLogin_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdLogin.Click

        g = New Global1.Global1

        userid = txtUsername.Text

        '   Dim oAccessrights As New ICICI.AccessRights.UsersDB(userid, "M_EMPLOYEE")
        Dim empobj As New ICICI.Aottracker.Employee(userid, g.CONNECTION)
        Dim pwd As String
        pwd = empobj.PASSWORD
        'validate entriees
        'If txtUsername.Text = "" Or txtpassword.Text = "" Then
        'MessageBox.Show("Please Enter your Login id and Password ", "Invalid", MessageBoxButtons.OK, MessageBoxIcon.Information)
        'Exit Sub
        'End If

        'if admin login
        If empobj.EMPLOYEEID <> 0 Then
            If txtpassword.Text = pwd Then

                MessageBox.Show("Welcome: " & txtUsername.Text & " ", "Login Successful", MessageBoxButtons.OK, MessageBoxIcon.Information)
                'Assing(Variables)
                'NuNameTB = empobj.EMPLOYEEID

                Me.Close()

                frmmain.Show()


            Else : MessageBox.Show("Invalid UserId or Password", "Incorrect", MessageBoxButtons.OK, MessageBoxIcon.Error)
                txtUsername.Text = ""
                txtpassword.Text = ""
                txtUsername.Focus()


            End If
        Else
            MsgBox("Invalid Login id. Please contact the System Administrator for creation of Login")
        End If




    End Sub


[edit]Code block added, "Treat my content as plain text..." option disabled - OriginalGriff[/edit]
Posted
Updated 22-Jan-12 1:03am
v2

1 solution

The error must be coming from the ICICI.Aottracker.Employee constructor.

Try to debug the code inside the constructor. There may be a clue.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900