def Open(self, p_autocommit=True):
try:
self.v_con = pymysql.connect(
host=self.v_host,
port=int(self.v_port),
db=self.v_service,
user=self.v_user,
password=self.v_password,
cursorclass=pymysql.cursors.DictCursor)
self.v_cur = self.v_con.cursor()
self.v_start = True
except pymysql.Error as exc:
raise Spartacus.Database.Exception(str(exc))
except Exception as exc:
raise Spartacus.Database.Exception(str(exc))
评论列表
文章目录