dataadapter.Update() OR ExecuteNonQuery()?

Last Post 01 Jun 2007 05:48 AM by drbrunno. 3 Replies.
AddThis - Bookmarking and Sharing Button Printer Friendly
  •  
  •  
  •  
  •  
  •  
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages
dactilifera
New Member
New Member

--
17 May 2007 09:15 PM
Hy, again! I am at the begining of an application. I have some modules that insert, delete and update only one row at one table. My question is should I use dataadapter.Update() or ExecuteNonQuery(). I prefer ExecuteNonQuery because I want to build a class : DataLayer to implement my own InsertProcedure(), UpdateProcedure(),DeleteProcedure(). I want speed in my application, so which is the best: dataadapter.Update() OR ExecuteNonQuery(). Thank you!
SQLUSA
New Member
New Member

--
19 May 2007 09:37 PM
Microsoft recommends that all calls to SQL server are through stored procedures.

Safety, performance and ease of maintenance.

Kalman Toth, Database Architect
SQL Server Training - http://www.sqlusa.com
dactilifera
New Member
New Member

--
20 May 2007 11:45 PM
Yes, you are right but even so how should I get data from a stored procedure : throught a dataadapter or an ExecuteReader ?
drbrunno
New Member
New Member

--
01 Jun 2007 05:48 AM
DataReader is much fast, but using DataAdapter with DataSet you can do many operations, but for read only DataReader is the best.

Sorry my English...
You are not authorized to post a reply.

Acceptable Use Policy