Visual Basic Code , VB.NET Code, VB Code
  Home   :  Code   :  Forums   :  Submit   :  Mailing List   :  About   :  Contact


system.indexoutofrangeexception error


system.indexoutofrangeexception error

Author
Message
maybuang09
maybuang09
Supreme Being
Supreme Being (253 reputation)Supreme Being (253 reputation)Supreme Being (253 reputation)Supreme Being (253 reputation)Supreme Being (253 reputation)Supreme Being (253 reputation)Supreme Being (253 reputation)Supreme Being (253 reputation)Supreme Being (253 reputation)

Group: Forum Members
Posts: 1, Visits: 1
hi guys could you help me with this error..?





here where the error occurs...



If sqlconn.State <> ConnectionState.Closed Then sqlconn.Close()

connectDB()

initCMD()

Try

query = "Select E.AppID as 'Applicant ID',E.FName as 'First Name',E.MName as 'Middle Name'," & _

" E.LName as 'Last Name' from tblEmpMaster as E" & _

" INNER JOIN tblLinks as L" & _

" ON E.AppID = L.fk_AppID" & _

" INNER JOIN tblRefInfo as I" & _

" ON L.RefID = I.RefID" & _

" where I.RefName = '" & cboRefCode.Text & "'"

Me.lvDetail.Items.Clear()

With sqlcmd

.CommandText = query

sqlDR = .ExecuteReader

End With



Do While sqlDR.Read

Item = Me.lvDetail.Items.Add(sqlDR!AppID.ToString)

Item.SubItems.Add(sqlDR!FName.ToString.Trim)

Item.SubItems.Add(sqlDR!MName.ToString.Trim)

Item.SubItems.Add(sqlDR!LName.ToString.Trim)

Loop

sqlDR.Close()

Catch ex As Exception

MsgBox(ex.ToString)

End Try



GO


Similar Topics


Reading This Topic


Login
Existing Account
Email Address:


Password:


Social Logins

Select a Forum....

















A1VBCode Forums


Search