Advertisement

05.14.2008 at 03:51PM PDT, ID: 23403460
[x]
Attachment Details

VB.net 2.0 DataGridView Fill with Wildcards

Asked by jaydwest in SQL Query Syntax, Visual Studio .NET 2005

Tags: VB.net, Visual Basic 2005, SQL Server 2005, DataGrid View, Wildcards

I'm trying to filter a DataGridView using a filter based on the text entered into a Text Box.  The SQL Server Query looks like
SELECT       *
FROM            <TableName>
WHERE        (<TableField> LIKE ?)

I would like to use Wildcard to find records.  So for example I have a Search FIeld <ForField> and I would like to find records using <ForField> and wildcards but I cannot seem to get the syntax right.  

If I wanted to modify the <ForField> how would I do it to

Find all records with <tableField> starting with <ForField>

Find all records with <TableField> ending with <ForField>

Find all records with <ForField> anywhere in <TableField>

For example, I have tried <ForField> & "%" for the first case, but it didn't work.


Start Free Trial
[+][-]05.14.2008 at 11:45PM PDT, ID: 21571099

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.15.2008 at 04:30AM PDT, ID: 21572381

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]05.15.2008 at 05:09AM PDT, ID: 21572578

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.15.2008 at 06:01AM PDT, ID: 21573057

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]05.15.2008 at 06:03AM PDT, ID: 21573071

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.15.2008 at 06:09AM PDT, ID: 21573153

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]05.15.2008 at 06:13AM PDT, ID: 21573181

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.17.2008 at 01:29PM PDT, ID: 21590662

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: SQL Query Syntax, Visual Studio .NET 2005
Tags: VB.net, Visual Basic 2005, SQL Server 2005, DataGrid View, Wildcards
Sign Up Now!
Solution Provided By: jaydwest
Participating Experts: 1
Solution Grade: A
 
 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628