Originally Posted by mrobertson
txtwidth.Text is a number such as 42.5678. I just want to select a range that is .5 higher and lower than that. What hould I do to get this result?
O.K. What about txthbgauge.Text
? I think it's got
to be one of them, since those are the only places the "-" occurs.
Also (again, I'm not familiar with C#.) have you tried "(txtwidth.Text) - 0.5
A possible "work around:" Let SQL do it for you with constructs like "width between (" + CStr(txtwidth.Text)) +" - 0.5) and " . . .
As an aside, a decade ago, when I retired, the between
SQL construct was not well implemented in most data base systems, and a query using it did not scale very well. For small tables -- a few Mb -- it could take several minutes to get a result, and, for a Tb size table, waiting for days was not uncommon. So, have you consulted with your DBA about table indices, and optimal query construction?