Hang on to the db connection as well as the cursor.