将数据插入到现有表中 [英] inserting the data in to the existing table
问题描述
大家好,
我创建了一个网页,使用了gridview,并使用了列名作为
hi all,
i had created a webpage in that i taken the gridview and in that i used the column names as
openingbalance,totalhrs,leavetaken,remaining
在所有这些列中,除了openbalance之外,其余所有列都存在于另一个表中,我只是这样写查询并填充了gridview.
Among all these columns except openingbalance remaining all columns are present in another table i just wrote the query like this and filled the gridview.
select E.EmployeeID,0 as OpeningBalance,E.FullName,S.TotalHrs,S.LeaveTaken,S.LeaveTypeId,
S.Remaining from Employee E left outer join CurrentYearLeaveSummery S on E.EmployeeID = S.EmployeeID
where s.LeaveTypeId=1
在该网页中,我为所有列提供了文本框,并为它们提供了编辑选项.
现在我的问题是我想插入或更新数据,然后该列的表会被反映出来,但是如果我在其中输入becoz的openingbalance输入值,则该表中没有列.
我需要如何在同一张表中使用该列才能从前端输入数据.
还要告诉我有关行命令的前端编辑选项代码.
in that webpage i given textbox for all columns and i given editing options to them.
Now my problem is i want to insert or update data then the table with that columns get reflected but if i enter value for openingbalance where it gets entered becoz there is no column in that table.
how i need to take that column in same table to enter the data from frontend.
also tell me edit option code in frontend withrespect to row command.
推荐答案
您不能在任何数据库表中插入或更新OpeningBalance列,因为它没有不存在.没有命令可以完成您的要求.
You can''t insert or update the OpeningBalance column in any database table because it doesn''t exist. There is no command to accomplish what you are asking.
这篇关于将数据插入到现有表中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!