question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Not able to Pass Parameter for Stored Procedure

See original GitHub issue

Below 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:closed
  • Created 5 years ago
  • Comments:21 (7 by maintainers)

github_iconTop GitHub Comments

9reactions
Jana2018commented, May 18, 2018

@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…

7reactions
Jana2018commented, May 18, 2018

@pleerock ORM means it should support for all databases not for only ms SQL. Node ms SQL supports for only ms SQL server.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found