Jump to content

aspx.net 2005 sql 2000 queries with like %


huseyin

Recommended Posts

hi to everbodyi am using aspx.net 2005 and sql 2000 db. i have some problem with queries that contain like % in the where clause.for example:select * from students where student_name like ' '"+txt_student_name.Text+"' %'if anybody knows the right format, can you help me !! (send me an example)or any source that i can have examples on like % queries will help thank you for ur replies

Link to comment
Share on other sites

Or he simply thought it was aspx.net, since the file extension is .aspx (typically at least, haven't heard of other endings).

Link to comment
Share on other sites

microsoft used the .mspx extension on their site (in some areas) I am not sure if that is just them being stupid and using their name int he extention...realistically I could use the .imcool extension as long as I map it in IIS.

Link to comment
Share on other sites

realistically I could use the .imcool extension as long as I map it in IIS.
Yeah, you can do that on Apache too, like set it to parse .asp files for php. I'm sure you can add random file extensions as well... :)Would be cool to have a .leet extension. :)
Link to comment
Share on other sites

did anyone know why the query mentioned above doesnt work, i didint ask for aspx.net, asp.net or asdfasfdasf.net it doesnt matter what is it ? if you know please reply if you dont know continue sending about aspx, asp ,asdasdfasdfadsf thank you

Link to comment
Share on other sites

The way you posted your sample code, if "txt_student_name.Text" is equal to "huseyin" then your query would look like this:

select * from students where student_name like ' 'huseyin' %'

It needs to be like:

select * from students where student_name like 'huseyin%'

or

select * from students where student_name like '%huseyin'

or

select * from students where student_name like '%huseyin%'

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...