Ciao ho questo codice
codice:
SQL = "select max(id) as MaxIdTestata from testateimg where codarch=" & codArch 
            Dim CMDT As New OleDbCommand(SQL, ConnDB)
            idTestata = CMDT.ExecuteScalar()
            
            SQLPacco = "select max(Pacco) as MaxPacco from testateimg where codarch=" & CodArch & " AND scatola=" & scatola
            'MsgBox(SQLPacco)
            CMDT.CommandText = SQLPacco
            CMDT.Connection = ConnDB
            Dim RDR As OleDb.OleDbDataReader = CMDT.ExecuteReader()

            If RDR.HasRows Then
                Pacco = RDR("MaxPacco") + 1   <--- errore qui
            Else
                Pacco = 1
            End If
            MsgBox(Pacco)
quando arrivo alla lettura di RDR entra nell'if soltanto che il valore di RDR e' null e va in errore, come posso fare a sapere se il mio reader e' pieno o vuoto? in pratica il vecchio RS.eof