Ask your own question, for FREE!
Computer Science 68 Online
OpenStudy (anonymous):

Nothing is showing up when I try this SQL Query: "SELECT Title, Author, Course, Section, ISBN FROM dbo.Table1 WHERE Title Like '%' + @value + '%'". Any suggestions? It works when I take everything after Table1 out.

OpenStudy (espex):

Perhaps you are not getting a @value passed and so it is looking for a single character or breaking.

OpenStudy (anonymous):

I'm just using the preview data thing in Visual Studio so I'm sure it's getting the right input. When I change Title to Section and search, for example, for S16 it works fine. It's just not working with the longer entries in the table for some reason.

OpenStudy (espex):

In an effort to troubleshoot I would suggest trying to pull an "any" list back from title and attempt to narrow it down to your "like" statement.

OpenStudy (anonymous):

I'm thinking it might be something to do with the database entries at this point

OpenStudy (farmdawgnation):

Can you output to the console what the entire query string is after @value is dropped in, and then paste that in here?

OpenStudy (anonymous):

It just returns nothing. When I use the Query builder in Visual Studio it works, but not when I try to preview it or use it in the application, it's weird. It only works with the exact search and not the wildcards. I don't know how to output to the console.

OpenStudy (anonymous):

Ya it just seems like the wildcards aren't working properly

OpenStudy (anonymous):

Figured it out lol, I just didn't have the return a datatable button checked. I feel pretty stupid now, I was trying to figure it for a good few hours

OpenStudy (anonymous):

don't worry not only you make such mistakes :P

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Latest Questions
Fz150: I created something. Give me names for herud83eudd7a
1 minute ago 6 Replies 0 Medals
Aliciaa: Is anyone elses QC going wack? Mine keeps freezing and stuff
19 minutes ago 4 Replies 0 Medals
autumnp: does anyone have bandlab?
7 minutes ago 4 Replies 0 Medals
Jeromeccv: Art for @vanessad123
1 hour ago 7 Replies 1 Medal
ohhhhhhhhhhhhhh: how do i slim my waist fast
16 minutes ago 4 Replies 1 Medal
uknownprttyfacekayla: I drew this not sure what i was aiming for but i just drew what my heart guided m
8 minutes ago 9 Replies 3 Medals
alphaXtiger: what is the meaning of math meaning who made it.
5 hours ago 3 Replies 3 Medals
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!