ASPForums.Net RSS Feedhttp://www.aspforums.net/Handlers/RSS.ashxLatest additions to the content that appears on ASPForums.Net(c) 2019 www.aspforums.com. All rights reserved.ASP.Net ExecuteScalar Error: Must declare the scalar variable<blockquote><cite>dorsa says:</cite> <pre><code class="csharp plain">cmd.Parameters.AddWithValue(</code><code class="csharp string">"@SubjectStudyId"</code><code class="csharp plain">,Convert.ToInt32(LblSubjectStudyId.Text));</code></pre> </blockquote> <p>&nbsp;Change the above with the below code.</p> <pre class="brush: csharp">cmd2.Parameters.AddWithValue(&#34;@SubjectStudyId&#34;,Convert.ToInt32(LblSubjectStudyId.Text));</pre> <p>&nbsp;</p>https://www.aspforums.net:443/Threads/398656/ASPNet-ExecuteScalar-Error-Must-declare-the-scalar-variable/https://www.aspforums.net:443/Threads/398656/ASPNet-ExecuteScalar-Error-Must-declare-the-scalar-variable/Sun, 06 Jan 2019 23:48:22 GMT