You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
shaohuzhang1
changed the title
[Bug] PYTHON函数库执行SQLSERVER的存储过程时,有插入临时表数据时报错
[Bug] When the PYTHON function library executes the SQLSERVER stored procedure, an error occurred when inserting temporary table data.
Mar 20, 2025
Contact Information
No response
MaxKB Version
v1.10.1-lts (build at 2025-02-13T18:52, commit: 0640d4c)
Problem Description
ALTER PROCEDURE [dbo].[Ai_MaxKb_Python_StockGet_33_lsb]
@PART_NAME VARCHAR ( 200 )='', --产品名称
@warehouse VARCHAR ( 200 )='', --仓库
@BATCH_NO VARCHAR ( 200 )='', --批次/色号
@USER_CODE VARCHAR ( 200 )='',
@message VARCHAR ( 500 )='' OUTPUT
AS BEGIN
-- 库存数据
CREATE TABLE #TempResult (
PART_NAME VARCHAR(100),
WAREHOUSE VARCHAR(100),
SQUARE DECIMAL(18,2),
SORT_ORDER INT
);
INSERT INTO #TempResult (PART_NAME, WAREHOUSE, SQUARE, SORT_ORDER)
SELECT 'A8877AS' AS PART_NAME, '上海' AS WAREHOUSE, 123 AS SQUARE, 1 AS SORT_ORDER;
SELECT * FROM #TempResult;
RETURN
END
Steps to Reproduce
只要函数库的PYTHON里,cursor.execute(f"EXEC Ai_MaxKb_Python_StockGet_33_lsb 'ABC'") 调用执行SQLSERVER的存储过程时,存储过程如上图示例,带有临时表且,注意是且插入临时表数据表就会报错
The expected correct result
No response
Related log output
Additional Information
No response
The text was updated successfully, but these errors were encountered: