-----------------------------------------------------------

New Message on cochindotnet

-----------------------------------------------------------
From: sajay
Message 1 in Discussion


 

  -----Original Message-----
From: Vimal Ghosh 
  [mailto:[EMAIL PROTECTED]


  9 Data-Access Best Practices 
  Tips
   
  1. 
  Use the Appropriate Data-Access Object -Always use 
  the DataReader's streaming data access for read-only data retrieval 
  operations. Use the DataSet object for data update operations only if you need 
  to perform the updates in disconnected mode. (Alternatively, you can write 
  dedicated update stored procedures that resolve updates for you). 
  
   
  2. 
  Use Stored Procedures, Not Embedded T-SQL
   
  3. Use Complex Stored Procedures, Not Multiple 
  Retrievals
   
  4. 
  Use SQL Data Types With SQL Server -Always use typed accessor methods when 
  retrieving SQL Server data to avoid type-conversion 
  errors.
   
  5. 
  Use Connection Pooling
   
  6. 
  Use Centralized Data-Access Functions - Microsoft provides a .NET component named 
the Microsoft 
  Application Blocks for .NET, which contain optimized data-access wrapper 
  functions. You can read more about this, and download the code, at 
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnbda/html/daab-rm.asp.
   
  7.Use Good Programming Sense -Open the connection right before it is needed, and 
close it 
  as soon as it is no longer required. Never leave open connections in your 
  code, especially if you are working with streaming data objects such as the 
  DataReader. In summary, close connections and clear unused object references - 
  this is good coding practice, and it makes good 
  sense.
   
  8.Use Exception Handling Appropriately -Exception handling is 
  expensive, especially throwing errors. Always implement structured error 
  handling in your applications, but design your code to avoid falling into 
  exception handlers.Throw exceptions only if absolutely necessary because this 
  is an expensive operation.
   
  9. Use Helper Technologies -ASP.NET provides technologies 
  that complement ADO.NET in providing optimized data access. In particular, 
  ASP.NET supports a sophisticated set of caching options ranging from 
  page-level output caching to data caching using the Cache 
  API
   
  Thanks,
  Vimal
   
   

-----------------------------------------------------------

To stop getting this e-mail, or change how often it arrives, go to your E-mail 
Settings.
http://groups.msn.com/cochindotnet/_emailsettings.msnw

Need help? If you've forgotten your password, please go to Passport Member Services.
http://groups.msn.com/_passportredir.msnw?ppmprop=help

For other questions or feedback, go to our Contact Us page.
http://groups.msn.com/contact

If you do not want to receive future e-mail from this MSN group, or if you received 
this message by mistake, please click the "Remove" link below. On the pre-addressed 
e-mail message that opens, simply click "Send". Your e-mail address will be deleted 
from this group's mailing list.
mailto:[EMAIL PROTECTED]

Reply via email to