ERROR in TableAdapter Query
Posted on 2006-11-24
It Generates a ERROR with Parmeter. I am trying to Create a Query in TableAdapter with a Parameter so I can take a Textbox.Text on the Form and Filter results. Below is the Button Event Sub that contains code that Filters the records. Second is the SQL in the TableAdapter. It is interesting to note that SearchString is BLUE UNDERLINED in the second line of code in cmdAdd_click sub. I am using Access backend, but I also need to be able to use SQL Server back-end.
Private Sub cmdAdd_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdAdd.Click
Dim SearchString As String = "%" & Me.txtCatalogNumberLike.Text & "%"
Here is the Query under TableAdapter
SELECT InventoryID, SupplierID, CatalogNumber, CatagoryPart, EDPNo, Description, ListPrice, OHB, ROP, OOQ, StockCheckDate, UnitofQuantity,
LocationNumber, Reorder, RestockQty
WHERE (CatalogNumber = @Test)
Thank You 500 pts.