add missing con.open() in executeScalar