GeekInterview.com
   Home |  Tech FAQ  |   Interview Questions |  Placement Papers |  Tech Articles |  Learn |  Freelance Projects |  Online Testing |  Geeks Talk |  Job Postings |  Knowledge Base | Site Search |  Add/Ask Question

  GeekInterview.com  >  Interview Questions  >  Microsoft  >  Ado.NET

 Print  |  
Question:  Database Method

Answer: If we are not returning any records from the database, which method is to be used?


May 05, 2009 07:44:37 #9
 Anandbprem   Member Since: October 2007    Total Comments: 2 

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.
     

 

Back To Question