Thursday 16 January 2014

Difference between DataSet and DataReader objects:-



 Difference between DataSet and DataReader objects :-

DataSet object

DataReader object

Read/Write access
Read-only access
Supports multiple tables from different databases
Supports a single table based on a single SQL query of one database
Disconnected mode
Connected mode
Bind to multiple controls
Bind to a single control
Forward and backward scanning of data
Forward-only scanning of data
Slower access to data
Faster access to data
Greater overhead to enable additional features
Lightweight object with very little overhead
Supported by Visual Studio .NET tools
Must be manually coded

Wednesday 15 January 2014

Difference between Delete and Truncate:-



Difference between  Delete and Truncate:-
Truncate:-
1:-Truncate in a DDL operation.
2:-Truncate is faster
3:-Truncate reset the identity column value.
4:-We can’t use condition in truncate.
5:- We can’t rollback in truncate.
Delete:-
1:- Delete is a  DML operation
2:- Delete is slow.
3:-Delete can’t reset identity column value.
4:-We can use condition in delete.
5:-We can rollback in delete.