import pypyodbc as pyodbc
DBSource = 'C:\\Users\\Database\\Desktop\\GA005_test.mdb'
conn = pypyodbc.connect("Driver={Microsoft Access Driver (*.mdb, *.accdb)};DBQ=C:\\Users\\Database\\Desktop\\GA005_test.mdb;")
cursor = conn.cursor()
DBDest = 'C:\\Users\\Database\\Desktop\\ROWBlank.mdb'
conn2 = pypyodbc.connect("Driver={Microsoft Access Driver (*.mdb, *.accdb)};DBQ=C:\\Users\\Database\\Desktop\\ROWBlank.mdb;")
cursor2 = conn2.cursor()
SQL = """select *
FROM HRO;"""
for row in cursor.execute(SQL):
k = row.naam
print (k)
cursor2.execute("""insert into ROWBlank.mdb values (?)""", (k))
conn2.commit()
cursor.close()
conn.close()
cursor2.close()
conn2.close()
Traceback (most recent call last):
File "C:\Users\Database\Desktop\importoldtonew.py", line 1, in <module>
import pypyodbc as pyodbc
ImportError: No module named 'pypyodbc'
Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.
”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.
Our community of experts have been thoroughly vetted for their expertise and industry experience.
The Distinguished Expert awards are presented to the top veteran and rookie experts to earn the most points in the top 50 topics.