0

Hi,
what should i use to make the data inserted is in all capital letter?
here is insert statement:

string query = "INSERT into Categories  values (' " + textbox5_value + " ', ' " + textbox6_value + " ', ' " + textbox7_value + " ' )";

strToUpper() is used to make it convert to all capital letter but i don't know where should i put it? can i use this?

2
Contributors
2
Replies
3
Views
7 Years
Discussion Span
Last Post by new SE
0

Hi,
what should i use to make the data inserted is in all capital letter?
here is insert statement:

string query = "INSERT into Categories  values (' " + textbox5_value + " ', ' " + textbox6_value + " ', ' " + textbox7_value + " ' )";

strToUpper() is used to make it convert to all capital letter but i don't know where should i put it? can i use this?

You can do it in the following way assuming that your values are already in string form:

string query = "INSERT into Categories  values (' " + textbox5_value.ToUpper() + " ', ' " + textbox6_value.ToUpper() + " ', ' " + textbox7_value.ToUpper() + " ' )";

However, if the input is not in string form then you will need to convert to string prior to appending the .ToUpper().

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.