Quit when SQL_NULL_DATA is returned in ctrl_error()

Quit when SQL_NULL_DATA is returned in ctrl_error()