Click here to Skip to main content
15,912,756 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hai friends,

I have a doubt.I am having a image button.I have to put label box over that image.In that label box control I have to display the total number of rows affected from sql query.How can I do this.
Plz help me.


Thanks in advance.
Posted
Comments
CPallini 27-Jan-14 8:17am    
What is the doubt about? What kind of query are you executing?
ZurdoDev 27-Jan-14 8:24am    
Where are you stuck?

1 solution

IN MS SQL
===========

SQL
UPDATE TableName
SET FieldName= 'Value'
WHERE FieldName = 'Value'


IF @@ROWCOUNT = 0
PRINT 'Warning: No rows were updated';




IN C# (DataSet)
==============

C#
ds.Tables[0].GetChanges(DataRowState.Modified).Rows.Count;
 
Share this answer
 

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