troubleshooting Question

using the LIKE statement in a table adapter

Avatar of billyboy71
billyboy71 asked on
Visual Basic.NET
7 Comments1 Solution1791 ViewsLast Modified:
Hi,

I am creating a table adapter which uses the SELECT query with a LIKE statement. However I can't seem to get the LIKE statement to work. I can get "=" statement to work but not the LIKE statement.

This does not work. It returns no values even when I enter the partial string correctly.
SELECT         episode, content, kewords, date, mpg
FROM             tbl_HappyStudy
WHERE         (content LIKE @content)

But this works fine. When I enter the exact string.
SELECT         episode, content, kewords, date, mpg
FROM             tbl_HappyStudyChinese
WHERE         (content = @content)

However, I would like to be able to search by a partial string. How can I use the 'LIKE' statement?

Thanks.
Peter
ASKER CERTIFIED SOLUTION
PashaMod

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 7 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 7 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros