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.MS Access Database error: No value given for one or more required parameters<p>Please use this code it uses Parameters to pass value to the Query.</p> <pre class="brush: csharp">Protected Sub DropDownList3_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles DropDownList3.SelectedIndexChanged If DropDownList3.SelectedItem.Value = &#34;Please Select&#34; Then Page.ClientScript.RegisterStartupScript(Me.GetType, &#34;Forms&#34;, &#34;&lt;script&gt; alert(&#39;Please select a valid ID1 ... it can&#39;t be blank.........&#39;) &lt;/script&gt;&#34;) DropDownList3.Focus() Else Dim connectString As String = &#34;Provider=Microsoft.Jet.OLEDB.4.0;&#34; &amp; _ &#34;Data Source=C:\web\baiju.mdb&#34; Dim con As OleDbConnection = New OleDbConnection(connectString) con.Open() Dim qstr As String qstr = &#34;select * from Tak1 where id1 = @id1&#34; Dim OleDb As New OleDbDataAdapter(qstr, con) OleDb.SelectCommand.Parameters.AddWithValue(&#34;@id1&#34;, DropDownList3.SelectedItem.Value) Dim dt As New DataSet OleDb.Fill(dt, &#34;[Tak1]&#34;) If dt.Tables(&#34;[Tak1]&#34;) IsNot Nothing AndAlso dt.Tables(&#34;[Tak1]&#34;).Rows.Count &gt; 0 AndAlso (dt.Tables(&#34;[Tak1]&#34;).Rows(0).Item(&#34;Remarks_&#34;) Is System.DBNull.Value &lt;&gt; True) Then addlrmk.Text = dt.Tables(&#34;[Tak1]&#34;).Rows(0).Item(&#34;Remarks_&#34;) Else addlrmk.Text = &#34;&#34; End If End If End Sub</pre> <p>&nbsp;</p>https://www.aspforums.net:443/Threads/914382/MS-Access-Database-error-No-value-given-for-one-or-more-required-parameters/https://www.aspforums.net:443/Threads/914382/MS-Access-Database-error-No-value-given-for-one-or-more-required-parameters/Wed, 26 Nov 2014 01:52:21 GMT