I am going 'grey' with this problem! I have the most simple of queries which works fine in SQL server, but won't work on the web page! I'm 99% certain the error is due to the quote symbol (after the number 0.050). Sadly, I need to use a quote symbol as some of my measurements are in inches (others in millimeters)!
When my code runs in SQL server, it works fine and I use (this is a very stripped down version):
Expand|Select|Wrap|Line Numbers
- SELECT * FROM View_BoardToBoard WHERE Pitch LIKE '0.050"'
The code in my CS webpage is:
Expand|Select|Wrap|Line Numbers
- string strPitch = "0.050"";
- string strSQL = "SELECT * FROM View_BoardToBoard WHERE Pitch LIKE '"+strPitch+"'";
Expand|Select|Wrap|Line Numbers
- string strPitch = "0.050"";
Any ideas?