我收到以下代码的错误消息,无法找到准确的信息以通过sequelize调用MSSQL存储过程的语法。我也曾尝试syntx从其他岗位上的计算器类似于呼叫spcName(参数1,...)使用MSSQL调用具有输入参数的存储过程的setaelize sytax
错误:
(node:14580) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): SequelizeDatabaseError: Incorrect syntax near '@param1'.
代码:
await sequelize.query('CALL spcName(@param1, @param2, @param3, @param4);', [value1, value2, value3, value4])
仅供参考 - 我已经登录的问题与Sequelize有关对存储过程的查询返回重复的结果集。 – Kentonbmax
还记录了我的存储过程调用正在返回重复结果的问题。含有结果数组阵列或[[results],[results]] – Kentonbmax
QueryTypes.SELECT的添加修复了重复结果问题。 – Kentonbmax