can anyone help me regarding this??..i have here the code to get the new last record after deleting the last record...but i encountered an error saying... "An unhandled exception of type 'System.IndexOutOfRangeException' occurred in System.Data.dll
Additional information: locid, make sure data column names are correct, ,make sure the index is not a negative number, make sure that the maximum index on the list is less than the list size"....
access = "select MAX(locid) from tbl_location"
cmd = New OleDbCommand(access, con)
con.Open()
dtr = cmd.ExecuteReader()
If dtr.HasRows() Then
dtr.Read()
txt_locid.Text = dtr("locid").ToString
txt_locname.Text = dtr("locname").ToString
txt_locadd.Text = dtr("locadd").ToString
con.Close()
End If