Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > gridview select command question

Reply
Thread Tools

gridview select command question

 
 
Tammy B
Guest
Posts: n/a
 
      03-06-2006
Hi!

I have the following select command:
SelectCommand="SELECT [id], [Name], [Address1], [Address2], [CITY], [STATE],
[ZIP], [COUNTRY] from [MyTable] WHERE ([Address1] = @txtAddress1)"

I would like to be able to use a LIKE operator rather than EQUALS

I can't figure it.

Can you help?

THANKS!!!!


 
Reply With Quote
 
 
 
 
Munawar Hussain
Guest
Posts: n/a
 
      03-07-2006
Hi,
you can use

SelectCommand="SELECT [id], [Name], [Address1], [Address2], [CITY], [STATE],
[ZIP], [COUNTRY] from [MyTable] WHERE ([Address1] LIKE '%' + @txtAddress1
+'%' )"

It would work fine...

Best wishes
Munawar Hussain

http://www.velocityreviews.com/forums/(E-Mail Removed)


"Tammy B" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Hi!
>
> I have the following select command:
> SelectCommand="SELECT [id], [Name], [Address1], [Address2], [CITY],
> [STATE], [ZIP], [COUNTRY] from [MyTable] WHERE ([Address1] =
> @txtAddress1)"
>
> I would like to be able to use a LIKE operator rather than EQUALS
>
> I can't figure it.
>
> Can you help?
>
> THANKS!!!!
>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
select gridview row without using select button? =?Utf-8?B?RGFiYmxlcg==?= ASP .Net 5 02-27-2009 02:56 AM
select command on the gridview sanam ASP .Net 0 08-09-2008 07:39 AM
GridView EnableSortingAndPagingCallBacks Select command. MikeS ASP .Net Web Controls 4 11-16-2006 02:25 AM
GridView Hierarchical View - Gridview in Gridview =?Utf-8?B?bWdvbnphbGVzMw==?= ASP .Net 1 05-09-2006 06:48 PM
select of select box will select multiple in another box palmiere Javascript 1 02-09-2004 01:11 PM



Advertisments