如何在插入前检查值 [英] how to check value before insertion
问题描述
我在SQL服务器上有两个表
1:客户(id,name,salary,CNIC)值(1,'john',$ 10000,12312)
2:第二个表是advance_income(id,date,adv_income)值(1,12sep2015,$ 500)
我在asp.net中有两个文本框#br />
CNIC< textbox>
薪水< textbox>
现在我想要当我输入CNIC号码和工资收入存储给那些等于文本框和SQL的工资的人
任何人都可以帮我做这个.......
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.......
推荐答案
10000,12312)
2:第二个表是advance_income(id,date,adv_income)值(1,12sep2015,
10000,12312)
2:And second table is advance_income(id,date,adv_income)values(1,12sep2015,
500)
我在asp.net中有两个文本框c#
CNIC< textbox>
薪水< textbox>
现在我想在我输入CNIC号码和工资收入时存储给那些h的人ave等于文本框和SQL的工资
任何人都可以帮我做这个.......
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.......
首先你需要检索来自sql server的数据:
First of all you have to retrieve data from sql server that is:
Select id from customer where cnic='" + YourCNICTextBoxId.Text + "'
之后你可以更新输出id的工资。
问候,
AARIF SHAIKH
after that you can update salary of output id's.
Regards,
AARIF SHAIKH
这篇关于如何在插入前检查值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!