Hi
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):
The code in my CS webpage is:
This displays no results! As mentioned above, it must be because of the " (quote) symbol! I obviously can't do:
as I'll get a Newline in constant error message!!
Any ideas?
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):
Code:
SELECT * FROM View_BoardToBoard WHERE Pitch LIKE '0.050"'
The code in my CS webpage is:
Code:
string strPitch = "0.050""; string strSQL = "SELECT * FROM View_BoardToBoard WHERE Pitch LIKE '"+strPitch+"'";
Code:
string strPitch = "0.050"";
Any ideas?
Comment