Click here to Skip to main content
15,949,741 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more: , +
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

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

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.
Posted

1 solution

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.
 
Share this answer
 
Comments
mandarapu 18-May-11 8:25am    
what i am asking is i need to add that column in that table or any other solution for that.
[no name] 18-May-11 9:34am    
OK, then use SQL management studio to modify the table and add the column. This not related to asp.net, c# or your original question
mandarapu 18-May-11 9:52am    
can u tell me how to write code for giving editing option in gridview cow command

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