<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: rajeshalda</title>
    <description>The latest articles on DEV Community by rajeshalda (@rajeshalda).</description>
    <link>https://dev.to/rajeshalda</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1011286%2Fa5d0d0b4-bbe6-4c0b-a378-29a7111181bb.jpg</url>
      <title>DEV Community: rajeshalda</title>
      <link>https://dev.to/rajeshalda</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/rajeshalda"/>
    <language>en</language>
    <item>
      <title>Calling the SP from MSsql issuse</title>
      <dc:creator>rajeshalda</dc:creator>
      <pubDate>Thu, 19 Jan 2023 16:12:42 +0000</pubDate>
      <link>https://dev.to/rajeshalda/calling-the-sp-from-mssql-issuse-3kkm</link>
      <guid>https://dev.to/rajeshalda/calling-the-sp-from-mssql-issuse-3kkm</guid>
      <description>&lt;p&gt;I am trying to calling the SP from MSSQL and I am getting an error:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;exports.ExportPropertyReport = catchAsyncErrors(async(req, res, APN, TimeTrend, MONTH_YEAR, lowrange, highrange) =&amp;gt; {
    // const APN = req.body.APN;
    try {
        let pool = await sql.connect(config, { requestTimeout: 30000 })
        //let pool = await sql.connect(config)
        let result = await pool.request()
            .input('APN', sql.Float, APN)
            .input('TimeTrend', sql.NVarChar, TimeTrend)
            .input('MONTH_YEAER', sql.NVarChar, MONTH_YEAR)
            .input('LOWRANGE', sql.VarChar, lowrange)
            .input('HighRange', sql.VarChar, highrange)
            .execute('dbo.Usp_ExportPropertyReport')

        console.log(result.recordset);

        sql.close();

        res.status(200).json({
            success: true,
            message: `ExportPropertyReport called successfully`,
            result
        });

    } catch (err) {
        console.log(err);
        res.status(500).json({
            "error": true,
            "message": "Error executing query"
        });
    }
});
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;error message : &lt;/p&gt;

&lt;p&gt;RequestError: Validation failed for parameter 'APN'. Invalid number. at Request.userCallback (E:\spcall\node_modules\mssql\lib\tedious\request.js:811:19) at Request.callback (E:\spcall\node_modules\tedious\lib\request.js:205:14) at E:\spcall\node_modules\tedious\lib\connection.js:1982:17 at processTicksAndRejections (node:internal/process/task_queues:78:11) { code: 'EPARAM',&lt;/p&gt;

</description>
      <category>watercooler</category>
    </item>
  </channel>
</rss>
