Hey there,
Best guess from reading your question is that you're having trouble with
type casting[
^] :)
C# (and SQL, for that matter) will often freak out if you try to use the wrong data type (ie, string instead of int/double/float) in a statement.
For example:
int eight = 0;
eight = "0";
eight = 5 + 3;
eight = 5 + "3";
There isn't quite enough information in your question to tell what kind of casting you have to do, but you'll probably have to do something along the lines of this:
int casted_value = (int)textbox.Text;
Keep in mind that casting a variable from one type to another will cause unwanted runtime errors if the data being entered is malformed in any way - for example:
string five = "five";
int converted_five = (int)five;
To mitigate this risk, make sure you programmatically validate and clean all data before attempting type casting.
Lastly, as ppolymorphe mentioned above - directly concatenating SQL queries using strings has enormous security risks, and can/will lead to your entire database being leaked / corrupted / misused as soon as you deploy your application :)