[RESOLVED] [2005] dataset query with @ literal
I have a query that actually needs to use an @ sign in a literal ... where lastName not like '@%'. of course .net thinks this is supposed to be a parameter, is there a way to do this in the table adapter designer?
I'm looking for data where the lastname does not start with an @ sign, and would like to build a dataset off of this.
Re: [2005] dataset query with @ literal
I think you can use the escape characters to do that. I can't remember the syntax for VB.Net but I think it's something like this:
Code:
WHERE lastName NOT LIKE '"@%'
Alternatively Chr(64) may work.
Re: [2005] dataset query with @ literal
Use Chr(Asc("@"c)) like this:
MessageBox.Show("""" & Chr(Asc("@"c)) & "%""")
Re: [2005] dataset query with @ literal
Quote:
Originally Posted by kasracer
I think you can use the escape characters to do that. I can't remember the syntax for VB.Net but I think it's something like this:
Code:
WHERE lastName NOT LIKE '"@%'
Alternatively
Chr(64) may work.
This appears to work, thank you!
Re: [2005] dataset query with @ literal
Quote:
Originally Posted by Deepak Sakpal
Use Chr(Asc("@"c)) like this:
MessageBox.Show("""" & Chr(Asc("@"c)) & "%""")
This doesn't work in the designer, the other post worked though.