How to get updated column name

Posted by Bhavna81 under Regular Expressions on 11/25/2009 | Views : 1325 | Status : [Member] | Replies : 2
hello,

in my ASP.NET application when i search a record then edit some value in that record. after editing when i click submit button that perticular record is updated in database. i have 150 fields in my table.
Now my question is when i click on button and update query is fired, which columns are affected by that query. i want that column names as result.

how can i do....

thanks.




Responses

Posted by: Abhijit Jana on: 11/25/2009 [Member] [MVP] Bronze

Up
0
Down
If you are updating some field and searching the data from database, then those table should have a primary key. so based on that primary key you can update the filed. If you want to know the column name, then you have to know the predefine control where you are updating .
Are you updating from gridview or from where ?


Cheers !
Abhijit

Bhavna81, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Sagarp on: 1/15/2010 [Member] Bronze

Up
0
Down
HI


u have add one column name id in ur table that that column auto increment property

select name,address from table1 where id=(select max(id) from table1)

output max name means lates insert record u can update that colum

Thanks
SagarP
http://www.emanonsolutions.net
http://emanonsolutions.blogspot.com/

Bhavna81, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response