Using C# in the code-behind...
The Visual Studio.NET SQL Query Builder does a great job of building basic SQL statements, like:
"SELECT * FROM Users"
But I want to insert a local variable into the statement. So I go directly to the Web Form Designer generated code and insert my
variable, like this:
"SELECT * FROM users WHERE user_ID = " + num; (where num is a local int)
This works a few times but then VS.NET blows it away and the program barfs. The select statement is deleted, probably because I
messed directly with the Web Form Designer generated code. I can accept that but I can't figure out how to put this into the
Query Builder directly. It doesn't show the quotation marks and generates a bad statement with whatever I've tried.
Is there a way to do this WHERE modification to the SQL statement directly in the Query Builder? Thanks for your help.