GeekInterview.com
  I am new, Sign me up!
 
GeekInterview.com  >  Interview Questions  >  Microsoft  >  Ado.NET
Go To First  |  Previous Question  |  
 Ado.NET  |  Question 31 of 31    Print  
Database Method
If we are not returning any records from the database, which method is to be used?


  
Total Answers and Comments: 14 Last Update: November 05, 2009     Asked by: lavi_rajput 
  
 Sponsored Links

 
 Best Rated Answer
Submitted by: Pendurti
 
There is a method called Execute Non Query. This method executes the Update, Delete etc. 
This does not return any rows but will give the number of rows affected.



Above answer was rated as good by the following members:
asifeqbal, chinnar729, hellodebasish, pratikgotal, PawanKum, sathin
  Sorting Options  
  Page 1 of 2   « First    1    2    >     Last »  
September 11, 2008 16:04:27   #1  
Pendurti Member Since: September 2008   Contribution: 10    

RE: Database Method
There is a method called Execute Non Query. This method executes the Update Delete etc.
This does not return any rows but will give the number of rows affected.


 
Is this answer useful? Yes | NoAnswer is useful 3   Answer is not useful 0Overall Rating: +3    
October 20, 2008 05:43:45   #2  
ptharak Member Since: October 2008   Contribution: 6    

RE: Database Method
DataAdapter Method is used
 
Is this answer useful? Yes | NoAnswer is useful 0   Answer is not useful 1Overall Rating: -1    
October 21, 2008 13:55:46   #3  
seemu123 Member Since: May 2008   Contribution: 15    

RE: Database Method
There is a method ExecuteNonQuery() in SQL Server Provider.It returns number of rows affected.
 
Is this answer useful? Yes | NoAnswer is useful 1   Answer is not useful 0Overall Rating: +1    
October 27, 2008 04:04:23   #4  
NavinSinha1986 Member Since: October 2008   Contribution: 1    

RE: Database Method

ExecuteNonQuery() method of SqlCommand or OledbCommand will execute the query but won't return value.....


 
Is this answer useful? Yes | No
November 05, 2008 01:20:48   #5  
kodandaharish Member Since: November 2008   Contribution: 1    

RE: Database Method
We can use both DataSet as well as SqlCommand object but as the data is meant only for viewing we are supposed to use SqlCommandObject.ExecuteNonQuery() for faster performance.
 
Is this answer useful? Yes | NoAnswer is useful 1   Answer is not useful 0Overall Rating: +1    
December 25, 2008 04:40:35   #6  
selvimathi Member Since: December 2008   Contribution: 4    

RE: Database Method
we can use ExecuteNonQuery() methed .
 
Is this answer useful? Yes | NoAnswer is useful 1   Answer is not useful 0Overall Rating: +1    
April 03, 2009 06:34:42   #7  
vallurinaveen Member Since: April 2009   Contribution: 1    

RE: Database Method
ExcuteNonQuery() method
 
Is this answer useful? Yes | NoAnswer is useful 1   Answer is not useful 0Overall Rating: +1    
May 06, 2009 05:54:46   #8  
asifeqbal Member Since: May 2009   Contribution: 1    

RE: Database Method
Execute Non Query
 
Is this answer useful? Yes | NoAnswer is useful 1   Answer is not useful 0Overall Rating: +1    
May 08, 2009 07:44:37   #9  
Anandbprem Member Since: October 2007   Contribution: 4    

RE: Database Method
You can use executeNonquery.

If your command is Insert Update or Delete executeNonquery returns an integer specifying the number of rows affected. Get it in an integer variable.

 
Is this answer useful? Yes | NoAnswer is useful 3   Answer is not useful 0Overall Rating: +3    
May 21, 2009 09:11:34   #10  
hellodebasish Member Since: May 2009   Contribution: 2    

RE: Database Method

cmd.excutenonquery()


 
Is this answer useful? Yes | No
  Page 1 of 2   « First    1    2    >     Last »  


 
Go To Top


 Sponsored Links

 
About Us -  Privacy Policy -  Terms and Conditions -  Contact -  Ask Question -  Propose Category -  Site Updates 

Copyright © 2005 - 2009 GeekInterview.com. All Rights Reserved

Page copy protected against web site content infringement by Copyscape