Click here to Skip to main content
15,915,611 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have a table named tbproduct (P_id,P_price,P_interest,P_barcode) i want to add the values from P_price and P_interest and display it in a textbox for example if P_price is 100 and P_interest is 20 then the textbox should display 120
i have no idea how to do that
thank you!
Posted

That is 4 different questions:
- How to do a request to my SQL base.
- How to get the result of the request.
- How to add 2 value from the result.
- How to put a value in TextBox.

Which one is a problem for you ?
What have you done ?

If done nothing, do you have a problem with your analyse method ?
 
Share this answer
 
SQL
SELECT P_id,P_price,P_interest,P_barcode, ( P_price+ P_interest) as T_price  tbproduct

then you can set T_price value as textbox text
 
Share this answer
 
v2
Comments
Sahand_B 30-Aug-15 2:42am    
thanks it works perfect

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900