Re: Search TextBox String
- From: "Steve C. Orr [MCSD, MVP, CSM, ASP Insider]" <Steve@xxxxxxx>
- Date: Mon, 22 Jan 2007 12:59:42 -0800
So you want to do a partial match?
Are you using the SQL Like clause?
Here's more info:
http://www.techonthenet.com/sql/like.php
http://www.1keydata.com/sql/sqllike.html
--
I hope this helps,
Steve C. Orr,
MCSD, MVP, CSM, ASPInsider
http://SteveOrr.net
"Mike C" <MikeC@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message news:A83B0899-4DCD-40FC-8778-E00DE6FEDF19@xxxxxxxxxxxxxxxx
I have an asp.net web page with a drop down box that populates the datagrid
on the change event. I have text box that I'd like to use to populate the
datagrid on the change event by matching the string values in the text box.
The code below works perfectly, but the string has to exaclty match the sql
table data source:
Dim _SqlAccounts As String = "Select * FROM IMSRejects WHERE
IMSRejects.VendorName = '" & strVendorName & "' ORDER BY VendorName ASC,
ProductDescription ASC"
I tried the variations below with no luck. Any thoughts? Thanks!!!
Dim _SqlAccounts As String = "Select * FROM IMSRejects WHERE
IMSRejects.VendorName = '%" & strVendorName & "%' ORDER BY VendorName ASC,
ProductDescription ASC"
Dim _SqlAccounts As String = "Select * FROM IMSRejects WHERE
IMSRejects.VendorName = '%" + strVendorName + "%' ORDER BY VendorName ASC,
ProductDescription ASC"
.
- Prev by Date: Re: Multiple inserts question
- Next by Date: possible? scripted DB drop/restore from backup, restart
- Previous by thread: Deserializing from string
- Next by thread: possible? scripted DB drop/restore from backup, restart
- Index(es):
Relevant Pages
|