Wednesday, 1 February 2012

Which query will be fast to give the records

SQL Query - 1:
SELECT COUNT(*)FROM TableName





SQL Query - 2:
SELECT rows FROM sysindexes WITH (NOLOCK) WHERE id = OBJECT_ID('TableName') AND IndId < 2


SQL Query - 3:
SELECT COUNT(*)FROM TableName where id=101





 

Tuesday, 31 January 2012

How to check null values in dataset


if(ds.Tables[0].Rows[0].IsNull(columnName)==true)
{
Response.write("Contains null value")
}

Difference between VB dll and assemblies in .NET


Assemblies can contain DLL and EXE both. Different versions 
of one DLL can be handeled by assemblies. They overcome the 
DLL Hell problem. Assemblies Contain Manifest and MetaData 
files. These are the seprate files that describes the 
Assembly and its attributes. 
 
VB DLL is inprocess.DLL run with an exe                   
where as DLL are not self executable. 
we can reuse DLLs .DLL are not platform independent
If we have more then one Versions of a DLL we can face DLL Hell Problem.