Click here to Skip to main content
15,894,740 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have two tables in SQL server

1:customer(id,name,salary,CNIC)values(1,'john',$10000,12312)
2:And second table is advance_income(id,date,adv_income)values(1,12sep2015,$500)
And i have two textbox in asp.net c#

CNIC<textbox>
Salary<textbox>

here now i want to when i enter the CNIC number And salary income that is stored to those person who have equal the salary of textbox and in SQL
anybody can help me please to do this.......
Posted
Comments
barneyman 1-Oct-15 0:32am    
please edit/rephrase the question - your first version is not exactly clear
Krunal Rohit 1-Oct-15 0:35am    
Please edit it. Elaborate it.

-KR
CHill60 1-Oct-15 7:17am    
Please use the Improve question link to edit your question to make it clearer what you are trying to do.
Even better, include the sql query that you have tried yourself - it might give us a clue!

1 solution

First of all you have to retrieve data from sql server that is:

SQL
Select id from customer where cnic='" + YourCNICTextBoxId.Text + "'


after that you can update salary of output id's.

Regards,
AARIF SHAIKH
 
Share this answer
 
Comments
Member 11963532 1-Oct-15 5:24am    
its can't be update because from which field i am comparing the value is already competed field
CHill60 1-Oct-15 7:16am    
This is vulnerable to SQL Injection[^] attacks and doesn't actually answer the OPs question

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