数据库插入数据时报错
回答
收藏

数据库插入数据时报错

握丶
2024-04-26 11:03·浏览量:185
握丶
发布于 2024-04-26 10:55更新于 2024-04-26 11:03185浏览


Traceback (most recent call last):

File "<string>", line 726, in _execute_command

File "<COMObject ADODB.Command>", line 3, in Execute

File "D:\影刀\ShadowBot\shadowbot-5.16.50\python\lib\site-packages\win32com\client\dynamic.py", line 287, in _ApplyTypes_

result = self._oleobj_.InvokeTypes(*(dispid, LCID, wFlags, retType, argTypes) + args)

pywintypes.com_error: (-2147352567, '发生意外。', (0, 'Microsoft OLE DB Provider for SQL Server', '从数据类型 nvarchar 转换为 float 时出错。', None, 0, -2147217913), None)


During handling of the above exception, another exception occurred:


Traceback (most recent call last):

File "D:\影刀\ShadowBot\shadowbot-5.16.50\python\lib\runpy.py", line 193, in _run_module_as_main

"__main__", mod_spec)

File "D:\影刀\ShadowBot\shadowbot-5.16.50\python\lib\runpy.py", line 85, in _run_code

exec(code, run_globals)

File "D:\影刀\ShadowBot\shadowbot-5.16.50\python\lib\site-packages\xbot_interpreter.py", line 113, in <module>

main()

File "D:\影刀\ShadowBot\shadowbot-5.16.50\python\lib\site-packages\xbot_interpreter.py", line 57, in main

try:

File "C:\Users\10137\AppData\Local\ShadowBot\users\678888096105267202\apps\61b18386-8344-47d0-adf1-f21d9a2bc9fb\xbot_robot\main.py", line 12, in main

xbot_visual.database.batch_insert(connect_way="database", database=database, conn_str=None, sql="INSERT INTO 投放数据表", data=excel_data, _block=("main", 4, "数据库批量插入数据"))

File "<string>", line 92, in wrapper

File "<string>", line 87, in wrapper

File "<string>", line 64, in batch_insert

File "<string>", line 45, in exec_many

File "<string>", line 70, in exec_many

File "<string>", line 932, in executemany

File "<string>", line 919, in execute

File "<string>", line 734, in _execute_command

File "<string>", line 607, in _raiseCursorError

File "<string>", line 57, in standardErrorHandler

xbot.adoapi.apibase.DatabaseError: (-2147352567, '发生意外。', (0, 'Microsoft OLE DB Provider for SQL Server', '从数据类型 nvarchar 转换为 float 时出错。', None, 0, -2147217913), None)

Command:

INSERT INTO 投放数据表 values (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)

Parameters:

[Name: p0, Dir.: Input, Type: adBSTR, Size: 2, Value: "日期", Precision: 0, NumericScale: 0

Name: p1, Dir.: Input, Type: adBSTR, Size: 4, Value: "价格区间", Precision: 0, NumericScale: 0

Name: p2, Dir.: Input, Type: adBSTR, Size: 2, Value: "排名", Precision: 0, NumericScale: 0

Name: p3, Dir.: Input, Type: adBSTR, Size: 4, Value: "商品编号", Precision: 0, NumericScale: 0

Name: p4, Dir.: Input, Type: adBSTR, Size: 4, Value: "商品名称", Precision: 0, NumericScale: 0

Name: p5, Dir.: Input, Type: adBSTR, Size: 4, Value: "所属品牌", Precision: 0, NumericScale: 0

Name: p6, Dir.: Input, Type: adBSTR, Size: 6, Value: "成交金额指数", Precision: 0, NumericScale: 0

Name: p7, Dir.: Input, Type: adBSTR, Size: 6, Value: "成交件数指数", Precision: 0, NumericScale: 0

Name: p8, Dir.: Input, Type: adBSTR, Size: 4, Value: "流量指数", Precision: 0, NumericScale: 0

Name: p9, Dir.: Input, Type: adBSTR, Size: 4, Value: "访客指数", Precision: 0, NumericScale: 0

Name: p10, Dir.: Input, Type: adBSTR, Size: 5, Value: "成交客单价", Precision: 0, NumericScale: 0

Name: p11, Dir.: Input, Type: adBSTR, Size: 5, Value: "成交转化率", Precision: 0, NumericScale: 0

Name: p12, Dir.: Input, Type: adBSTR, Size: 4, Value: "加购人数", Precision: 0, NumericScale: 0

Name: p13, Dir.: Input, Type: adBSTR, Size: 4, Value: "关注人数", Precision: 0, NumericScale: 0

Name: p14, Dir.: Input, Type: adBSTR, Size: 6, Value: "搜索点击指数", Precision: 0, NumericScale: 0]



收藏
全部回答1
最新
发布回答
回答