As shown on the attached image, there are wildcard searches for:
1. Title (works fine).
2. Unit Price (works only for exact price not partial digits
Question: How can I modify this vb.net sample project to allow partial searches work as well
FYI, spSoftwareSearch works for exact or partial searches in SSMS
. Meaning, the proc is okay. The focus of my question is on the application side.
Also, this sample is using untyped dataset. I will be happy to upload this small application for you to take a look at it. The application includes a small database set to work with SQL Express12.
ALTER PROCEDURE [dbo].[spSoftwareSearch]
, @UnitPrice money
FROM tblSoftware s
WHERE s.Title Like iif(@Title='', s.Title, '%' + @Title + '%') And
s.UnitPrice = iif(@UnitPrice = 0, s.UnitPrice, @UnitPrice)
Here is where you can download the app itself (8.1 MB): https://onedrive.live.com/?cid=420CDD6A13807C9B&id=420CDD6A13807C9B%21116