-
[2005] Like Query
cmd.CommandText = "SELECT * FROM Employee WHERE First_name LIKE '" & Search.Text & "*'"
cmd.Connection = cn
cmd.CommandType = CommandType.Text
da = New OleDbDataAdapter(cmd)
da.Fill(searcht)
details.DataSource = searcht
I m trying to search a user with this Bt i cannot get data :( and getting error :(
-
Re: [2005] Like Query
-
Re: [2005] Like Query
And I've got eels in my hovercraft.....
well, first you have to give it more than 30 minutes... many of us have other things in life to do... and secondly, you've told us nothing about the problem. what you ahve done is to drag your car into the shop and announce "It's broken" ... but what you failed to mention was that "there was a loud bang, some smoke, and the engine blew up"....
Ok, so, you are getting an error... great, that's fine... WHAT error? I mean, there are litterally thousands of different kinds of errors out there. Are you getting a "Check Engine" light? Are you getting a redflashing light? did toast pop out of your CD drive?
Point I'm trying to make is DETAILS... we need DETAILS to diagnose the problem.
-tg
-
Re: [2005] Like Query
Sry for dat..
and i resolved my problem...
i m using * insted of %
-
Re: [2005] Like Query
-
Re: [2005] Like Query
Just be careful if this is going to be a real applications for users to use.
It's 100% sql injection enabled.