Skip to content

Commit 3ff3385

Browse files
committed
refs #281, Got a little bit of MSAccess working
Duplicate still broken. Out of time to look at it for now
1 parent fc134c3 commit 3ff3385

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

pysimplesql/pysimplesql.py

+10-1
Original file line numberDiff line numberDiff line change
@@ -7941,10 +7941,19 @@ def duplicate_record(self, dataset: DataSet, children: bool) -> pd.DataFrame:
79417941
f"UPDATE {tmp_child} SET {fk_column} = {pk}",
79427942
f"INSERT INTO {child} SELECT * FROM {tmp_child};",
79437943
f"DROP TABLE IF EXISTS {tmp_child}",
7944+
LangFormat(exception=result.attrs["exception"])
7945+
print("\ncols\n", cols)
7946+
f"DROP TABLE IF EXISTS {tmp_child}",
7947+
f"CREATE TABLE {tmp_table} "
7948+
f"INSERT INTO {tmp_table} (SELECT * FROM {table} "
7949+
f"UPDATE {tmp_child} SET {pk_column} = NULL;",
7950+
f"UPDATE {tmp_child} SET {fk_column} = {pk}",
7951+
f"INSERT INTO {child} SELECT * FROM {tmp_child};",
7952+
f"DROP TABLE IF EXISTS {tmp_child}",
79447953
]
79457954
for q in queries:
79467955
res = self.execute(q)
7947-
if res.exception:
7956+
if res.attrs["exception"]:
79487957
return res
79497958

79507959
child_duplicated.append(r.child_table)

0 commit comments

Comments
 (0)