Home All Groups Group Topic Archive Search About

Like Parameter in VB.NET

Author
9 Dec 2004 7:04 PM
Manny
Hi there,

I'm trying to pass a parameter to a SQL Statement with the LIKE operator but
I'm not having luck on the syntax that I should use here.

I want to retreive the records that match the search criteria input by the
user.

Something like this: Select Test from Testtable WHERE test LIKE txtLastName
and then fill the adapter with those specific records, if any.

Can someone guide me to the right syntax here or suguest a better way to
accomplish this please.

Thanks very much,

Manny

Author
9 Dec 2004 9:02 PM
W.G. Ryan eMVP
http://www.knowdotnet.com/articles/temptables.html

Show quote
"Manny" <mcan***@hotmail.com> wrote in message
news:eKcfwHi3EHA.2336@TK2MSFTNGP15.phx.gbl...
> Hi there,
>
> I'm trying to pass a parameter to a SQL Statement with the LIKE operator
but
> I'm not having luck on the syntax that I should use here.
>
> I want to retreive the records that match the search criteria input by the
> user.
>
> Something like this: Select Test from Testtable WHERE test LIKE
txtLastName
> and then fill the adapter with those specific records, if any.
>
> Can someone guide me to the right syntax here or suguest a better way to
> accomplish this please.
>
> Thanks very much,
>
> Manny
>
>
>

AddThis Social Bookmark Button