use*_*106 4 pyodbc executemany
我试图使用列表作为值的来源将数据插入Access mdb文件.
cursor.execute("select * from Components")
cursor.executemany("""
INSERT INTO Components
([Database Number],Description, [Warehouse Code],[Supplier Code], Usage, Major1, Minor1)
VALUES (?,?,?,?,?,?,?)
"""), input_list
cursor.commit()
Run Code Online (Sandbox Code Playgroud)
我得到错误"TypeError:function需要2个参数(给定1个)".错误是指行"""),input_list
我做错了什么?在此先感谢您的帮助.
这是input_list的打印
['7', '1/2" PVC 90° Elbow', '406-005', 'SUP2', 'Y', 'PVC FS', 'PVC FS']
['7', '3/4" PVC 90° Elbow', '406-007', 'SUP2', 'Y', 'PVC FS', 'PVC FS']
['7', '1" PVC 90° Elbow', '406-010', 'SUP2', 'Y', 'PVC FS', 'PVC FS']
['7', '1.25" PVC 90° Elbow', '406-012', 'SUP2', 'Y', 'PVC FS', 'PVC FS']
['7', '1.5" PVC 90° Elbow', '406-015', 'SUP2', 'Y', 'PVC FS', 'PVC FS']
['7', '2" PVC 90° Elbow', '406-020', 'SUP2', 'Y', 'PVC FS', 'PVC FS']
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
13052 次 |
| 最近记录: |