Last post Oct 30, 2012 09:44 PM by Decker Dong - MSFT
Oct 30, 2012 04:15 AM|Jdaniel13|LINK
Dim dvProduct As DataView = CType( _
dvProduct.RowFilter = "ProductID = '" & ddlProducts.SelectedValue & "'"
this is used to display the the current data in the drowplist
but i want to change that to put it like that
Dim conss As New SqlConnection(_start)
Dim ss = ddlProducts.SelectedValue
Dim sql As String = "SELECT ProductName, UnitPrice,PhotoURl FROM Products WHERE ProductID = " & ss & ""
Dim Product As New Product
have u an idea how to convert that
Oct 30, 2012 04:22 AM|Mikesdotnetting|LINK
See how to create parameterised Access queries here: http://www.mikesdotnetting.com/Article/26/Parameter-Queries-in-ASP.NET-with-MS-Access
Oct 30, 2012 09:44 PM|Decker Dong - MSFT|LINK
If you wanna use a TextBox or a Dropdownlist to control with the result as a parameter that can filter out all the data contents from a specific datatable, you can also try to use ControlParameter+AccessDataSource.
Now you can see the sample similar to this (Though the sample is similar to AccessDataSource, however it's the same function if you apply this to AccessDataSource)……