Update attachsql driver for new error handling