View Single Post
  #5 (permalink)  
Old 04-20-2008, 09:28 PM
KiruthikaSambandam KiruthikaSambandam is offline
D-Web Analyst
 
Join Date: Aug 2007
Posts: 332
KiruthikaSambandam is on a distinguished road
Default Re: difference between ExecuteQuery And Execute NonQuery

ExecuteQuery from command Object

we can use the ExecuteNonQuery to perform catalog operations (Insert,Delete,Update)

ExecuteNonQuery does not return any rows, any output parameters or return values mapped to parameters are populated with data.

executeQuery() is for command objects i.e., this method will send "select statement" to database and returns value given by the database.
Moreover the executeQuery() is not used in .net but it is used in JAVA.

executeNonQuery() uses the "Insert/Update/Delete/Stored subprogram" , this method will return number of records effected by the database table


Thanks
KiruthikaSambandam
Reply With Quote