After i reach the last record and click the next button again, it throws the following exception:[Microsoft][ODBC Driver Manager] Invalid cursor state what i want to do is check if this is the last record. if this is the last record, display a message that this is the last record otherwise keep displaying the next record. how do i implement this idea? please help me with this. thanks.