manipulate nemeric data

patrick

Member
Joined
Aug 12, 2008
Messages
7
Programming Experience
3-5
i would like to know how to manipulate numeric data present in two textboxes
and save the result into the database
 
Define "manipulate". First up, TextBoxes contain text, not numbers, so you'd have to convert that text to numbers first. Exactly how you do that depends on what sort of numbers they are but you'd most likely call the TryParse method of the type you wanted to convert to, e.g. Integer.TryParse or Decimal.TryParse. Assuming both values convert successfully you can then perform whatever operations are appropriate on the results.
 
patrick, do you intend to make all your threads so short?
Here's a tip: If people see you putting some effort in, they're more inclined to help.
If it looks like youre trying to get away with putting the minimum in in order to get people to do your work for you, that tends to annoy them into providing a similar level of detail, or not helping at all.

Hence, here's your answer (and compare it with my answer to a guy who genuinely did put some effort in, in http://www.vbdotnetforums.com/data-access/30462-text-file-save-excel.html):

tb.Text = "manipulated text"
tableAdapter.Insert(tb.Text)

Have fun
 
yes a textbox can hold only text and we definitely have to convert it.... but assumming we have converted it how can we manipulate it
 
patrick, do you intend to make all your threads so short?
Here's a tip: If people see you putting some effort in, they're more inclined to help.
If it looks like youre trying to get away with putting the minimum in in order to get people to do your work for you, that tends to annoy them into providing a similar level of detail, or not helping at all.

Hence, here's your answer (and compare it with my answer to a guy who genuinely did put some effort in, in http://www.vbdotnetforums.com/data-access/30462-text-file-save-excel.html):

tb.Text = "manipulated text"
tableAdapter.Insert(tb.Text)

Have fun

for some reason, the link is not working.
 
manipulating numeric data

i want to manipulate numeric data store in the database with that retrieve from a text box...can someone tell me how to do it
 
i want to manipulate numeric data store in the database with that retrieve from a text box...can someone tell me how to do it
Sure. If you want to add two numbers you use +, if you want to subtract one number from another you use -, if you want to divide one number by another you use / and if you want to multiply two numbers you use *. The standard VB operators are not a secret. Any basic reading on the language would have told this. If that's not what you want then maybe a better explanation than "I want to manipulate numeric data" is in order. You're allowed to have up to 2000 characters in a post so don;t feel that you have to keep it to one sentence.
 

Latest posts

Back
Top