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.System.Data.OleDb.OleDbException: No value given for one ore more required parameters in ASP.Net<p>Hi&nbsp;xboxown,</p> <p>Please Change your sql select query with below query.</p> <p><span style="text-decoration: underline;">SQL</span></p> <pre class="brush: sql">SELECT [tblWorkOrderItem].WorkOrderItemID,[tblWorkOrderItem].bffGrade AS Item,[tblWorkOrderItem].Quantity AS Qty,[tblWorkOrderItem].Description,[tblWorkOrderItem].Note,[tblWorkOrder].[iCounter] FROM tblWorkOrderItem INNER JOIN tblWorkOrder ON tblWorkOrderItem.WorkOrderID = tblWorkOrder.WorkOrderID WHERE [tblWorkOrderItem].WorkOrderID=@ID</pre> <p>&nbsp;</p>https://www.aspforums.net:443/Threads/201400/SystemDataOleDbOleDbException-No-value-given-for-one-ore-more-required-parameters-in-ASPNet/https://www.aspforums.net:443/Threads/201400/SystemDataOleDbOleDbException-No-value-given-for-one-ore-more-required-parameters-in-ASPNet/Wed, 02 Aug 2017 02:25:46 GMTSystem.Data.OleDb.OleDbException: No value given for one ore more required parameters in ASP.Net<blockquote><cite>zameer says:</cite> <p>Hi&nbsp;xboxown,</p> <p>Please Change your sql select query with below query.</p> <p><span style="text-decoration: underline;">SQL</span></p> <div> <div id="highlighter_39766" class="syntaxhighlighter sql"> <table border="0" cellspacing="0" cellpadding="0"> <tbody> <tr> <td class="gutter"> <div class="line number1 index0 alt2">1</div> </td> <td class="code"> <div class="container"> <div class="line number1 index0 alt2"><code class="sql keyword">SELECT</code> <code class="sql plain">[tblWorkOrderItem].WorkOrderItemID,[tblWorkOrderItem].bffGrade </code><code class="sql keyword">AS</code> <code class="sql plain">Item,[tblWorkOrderItem].Quantity </code><code class="sql keyword">AS</code> <code class="sql plain">Qty,[tblWorkOrderItem].Description,[tblWorkOrderItem].Note,[tblWorkOrder].[iCounter] </code><code class="sql keyword">FROM</code> <code class="sql plain">tblWorkOrderItem </code><code class="sql keyword">INNER</code> <code class="sql color1">JOIN</code> <code class="sql plain">tblWorkOrder </code><code class="sql keyword">ON</code> <code class="sql plain">tblWorkOrderItem.WorkOrderID = tblWorkOrder.WorkOrderID </code><code class="sql keyword">WHERE</code> <code class="sql plain">[tblWorkOrderItem].WorkOrderID=@ID</code></div> </div> </td> </tr> </tbody> </table> </div> </div> <p>&nbsp;</p> </blockquote> <p>&nbsp;I did 100% exactly as you said and I still got the error message:</p> <p>&nbsp;</p> <p><img src="https://image.ibb.co/cS9gx5/snip_20170802095543.png" alt="Error message" width="1413" height="665" /></p> <p>&nbsp;</p> <p>Continuation of the string</p> <p>&nbsp;</p> <p><img src="https://image.ibb.co/cOSvPk/snip_20170802095733.png" alt="" width="1315" height="597" /></p> <p>&nbsp;</p> <p>Even this failed</p> <p>&nbsp;</p> <p>&nbsp;</p> <pre class="brush: sql">SELECT [tblWorkOrderItem].[WorkOrderItemID],[tblWorkOrderItem].[bffGrade] AS Item,[tblWorkOrderItem].[Quantity] AS Qty,[tblWorkOrderItem].[Description],[tblWorkOrderItem].[Note],[tblWorkOrder].[iCounter] FROM [tblWorkOrderItem] INNER JOIN [tblWorkOrder] ON [tblWorkOrderItem].[WorkOrderID] = [tblWorkOrder].[WorkOrderID] WHERE [tblWorkOrderItem].[WorkOrderID]</pre> <p>&nbsp;</p>https://www.aspforums.net:443/Threads/201400/SystemDataOleDbOleDbException-No-value-given-for-one-ore-more-required-parameters-in-ASPNet/https://www.aspforums.net:443/Threads/201400/SystemDataOleDbOleDbException-No-value-given-for-one-ore-more-required-parameters-in-ASPNet/Wed, 02 Aug 2017 10:56:28 GMTSystem.Data.OleDb.OleDbException: No value given for one ore more required parameters in ASP.Net<p>Check with the below code.</p> <pre class="brush: vb">Using con As New OleDbConnection(ConfigurationManager.ConnectionStrings(&#34;TestLocal&#34;).ConnectionString) Dim cmd As New OleDbCommand(&#34;SELECT [tblWorkOrderItem].WorkOrderItemID,[tblWorkOrderItem].bffGrade AS Item,[tblWorkOrderItem].Quantity AS Qty, [tblWorkOrderItem].Description, [tblWorkOrderItem].Note, [iCounter] FROM (tblWorkOrderItem INNER JOIN tblWorkOrder ON tblWorkOrderItem.WorkOrderID = tblWorkOrder.WorkOrderID) WHERE [tblWorkOrderItem].WorkOrderID=@ID&#34;, con) cmd.CommandType = CommandType.Text Dim myParamCollection As OleDbParameterCollection = cmd.Parameters Dim myParam As OleDbParameter = myParamCollection.Add(New OleDbParameter(&#34;@ID&#34;, OleDbType.[Integer])) myParam.Value = Convert.ToInt16(Session(&#34;ID&#34;)) &#39; Dim myICounter As OleDbParameter = myParamCollection.Add(New OleDbParameter(&#34;iCounter&#34;, OleDbType.Integer)) &#39; myICounter.Val con.Open() Dim selectResults As New DataSet() Dim ole_DBAdapter As New OleDbDataAdapter(cmd) ole_DBAdapter.Fill(selectResults) GridView1.DataSource = selectResults GridView1.DataBind() con.Close() End Using</pre> <p>I have checked with the code and is working in my side.</p>https://www.aspforums.net:443/Threads/201400/SystemDataOleDbOleDbException-No-value-given-for-one-ore-more-required-parameters-in-ASPNet/https://www.aspforums.net:443/Threads/201400/SystemDataOleDbOleDbException-No-value-given-for-one-ore-more-required-parameters-in-ASPNet/Thu, 03 Aug 2017 04:04:34 GMT