Not able to Pass Parameter for Stored Procedure
See original GitHub issueBelow is my Stored Procedure.
USE test
GO
CREATE PROCEDURE UPDATE_TASK @description1 nvarchar(1750)
AS
SELECT * FROM task where description1 = @description1;
GO
The above Stored Procedure, i am trying to invoke using typeorm, but it fails.
export async function storedProcedure(request: Request, response: Response) {
const manager = getManager();
const results = await manager.query(`UPDATE_TASK`, [{ description1: 'pawan' }]);
response.send(results);
}
and the Error is
QueryFailedError: Error: Procedure or function 'UPDATE_TASK' expects parameter '@description1', which was not supplied.
Issue Analytics
- State:
- Created 5 years ago
- Comments:21 (7 by maintainers)
Top Results From Across the Web
Can't pass parameters to stored procedure - Stack Overflow
Procedure or function 'spINSERTCARICO' expects parameter '@MARCA', which was not supplied. but I don't really see where is this coming from.
Read more >SQL Server Stored Procedure with Parameters
The real power of stored procedures is the ability to pass parameters and have the stored procedure handle the differing requests that are...
Read more >How to Pass Parameters to the Stored Procedure?
The most common mistakes developers do is to execute stored procedures as follows which generates the error. EXEC NameofSP(FirstParam, ...
Read more >Not able to pass Parameters in Stored Procedure through SSRS
I have created a stored procedure (fetching data from wonderware Historian). I want to pass parameter @Para from SSRS. But its not working....
Read more >CREATE PROCEDURE (Transact-SQL) - SQL Server
Transact-SQL syntax for stored procedures in SQL Server and Azure SQL ... it possible to use the LIKE keyword when passing the parameter ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@PawanKr2feb Better to avoid TypeOrm and use some other Technology, if you are developing something for Production… @pleerock As you mentioned that TypeOrm is a ORM so it won’t work with Stored Procedure…If i go By your logic then Hibernate should also not have supported Stored Procedure…
@pleerock ORM means it should support for all databases not for only ms SQL. Node ms SQL supports for only ms SQL server.