Fix last_err value in sqlitedataset.cpp