DotNet Mirror
  DNM facebook   DNM Google+   DNM Twitter   
Stats
Total Count : 97
Resources Publish New Article  
 
Does UNIQUE KEY supports more than one NULL Value?
Ashok Nalam

No. In SQL server we can insert only one NULL value to column which has UNIQUE KEY constraint.

Example:

CREATE TABLE SamepleUnique
(
Id INT PRIMARY KEY,
Name varchar(20) UNIQUE
)
INSERT INTO SamepleUnique VALUES(1,'Ram')
INSERT INTO SamepleUnique VALUES(2,'Krish')
INSERT INTO SamepleUnique VALUES(3,Null)
INSERT INTO SamepleUnique VALUES(4,Null) --Error as Violation of UNIQUE KEY constraint 'UQ__SamepleU__737584F603317E3D'. Cannot insert duplicate key in object 'dbo.SamepleUnique'.
--The statement has been terminated.


By: Ashok Nalam | 12 Dec 2012 | SQL Server | Views: 6503 | Comments: 1 | Tags:Constraints  unique key 
calling Javascript validation function before button click event in ASP.NET - onclientclick before onclick
Ashok Nalam
In this snippet we will see how to call a java script client side validation function before server side method execution.
By: Ashok Nalam | 13 Dec 2012 | ASP.NET | Views: 84957 | Comments: 2 | Tags:button  C#  javascript  onclick  onclientclick 
convert IP address to binary format using IPAddress Class in C#.NET
Ashok Nalam
In this snippet we will see how to convert an IP address to binary format using System.Net.IPAddress class.
By: Ashok Nalam | 15 Dec 2012 | C# | Views: 21746 | Comments: 0 | Tags:binary  converter  ip-address 
Constant variables in .NET
Ashok Nalam
In this article we will discuss about constant variables in .NET and with sample program.
By: Ashok Nalam | 15 Dec 2012 | C# | Views: 9428 | Comments: 0 | Tags:const  variable 
Implementing Singleton class in .NET
Ashok Nalam
In this article we will discuss about the implementation of singleton class in .NET with sample program.
By: Ashok Nalam | 16 Dec 2012 | C# | Views: 5630 | Comments: 0 | Tags:class  design pattern  singleton 
converting generic list/object to JSON and JSON to list/Object using JavaScriptSerializer in .NET
Ashok Nalam
In this article we will see how to convert an .NET object or generic list to JSON and JSON to .NET object or list using JavaScriptSerializer class.
By: Ashok Nalam | 17 Dec 2012 | C# | Views: 52742 | Comments: 0 | Tags:conversion  generics  JSON  list 
jsdebug issue for webservice call from ajax - NetworkError: 500 Internal Server Error
Ashok Nalam
We will see how to resolve the jsdebug issue while calling a web service from ajax.
By: Ashok Nalam | 19 Dec 2012 | ASP.NET | Views: 8851 | Comments: 0 | Tags:error  javascript  webservice 
Looping through rows without cursors in Sql server using while loop
Ashok Nalam
In this snippet we will see how to iterating through the table rows data with out using cursor in SQL server.
By: Ashok Nalam | 22 Dec 2012 | SQL Server | Views: 22387 | Comments: 0 | Tags:cursor  tsql 
Accessing parent class data members from derived class using base keyword in .NET
Ashok Nalam
we will see how to access parent class data member from derived class using base keyword
By: Ashok Nalam | 26 Dec 2012 | C# | Views: 95505 | Comments: 0 | Tags:inheritance  oops 
Difference between count(*) and count(column_name)
Ashok Nalam
We might assume that count(*) and count(column_name) will return same result count. But NO, in case of column holds any null values.

Count (*) – returns all values (including nulls and duplicates)
Count (Column_Name) – returns all Non-NULL values(including duplicates)

In the below script we will see how it works. So that it will be easy for us to understand.
create table #tempTable(Name char(1))
insert into #tempTable values("A")
insert into #tempTable values("B")
insert into #tempTable values(Null)
insert into #tempTable values("C")
insert into #tempTable values(Null)
insert into #tempTable values("C")
select COUNT(*) from #tempTable
select COUNT(Name) from #tempTable
drop table #tempTable
Output: 6 and 4
The table #temptable has total 6 rows. Count(*) returns all the rows including null/duplicates but where as count(name) returns only 4 rows which includes duplicates("C") but not null values.

If you want to remove the duplicates from count(Name) then use distinct keyword in it.
select COUNT(distinct Name) from #tempTable –-returns 3
By: Ashok Nalam | 28 Dec 2012 | SQL Server | Views: 11186 | Comments: 0 | Tags:difference  tsql 
What is managed and unmanaged code in .NET
Ashok Nalam
Manged Code - code which is executed under Common Language Runtime (CLR). Due to this, the code has  many benefits like memory management, support of version control, type safety and security. The code which targets CLR and written in .NET framework is a managed code. E.g: C#,VB.NET

Unmanaged code : code which is not executed under .NET runtime (CLR). CLR is does not have control over execution of code.memory management, security and type safety should be taken care by developer.  
E.g: VB6, C,C++. 

managed code typically compiled to Intermediate Language(IL) code where as unmanged code directly compiles to native code.
By: Ashok Nalam | 30 Dec 2012 | .NET Framework | Views: 11243 | Comments: 2 | Tags:.NET  difference 
Program to generate fibonacci series numbers in .NET
Ashok Nalam
In the this snippet we will generate a series of fibonacci numbers up to no of digits values entered from program.
By: Ashok Nalam | 30 Dec 2012 | C# | Views: 25074 | Comments: 0 | Tags:fibonacci  number 
Reading configuration settings (connection string and app settings) values of Web.config in JavaScript
Ashok Nalam
In this snippet, we will see how to read values which are defined in appsettings and connectionStrings sections of web.config in JavaScript using ASP.NET.
By: Ashok Nalam | 30 Dec 2012 | JavaScript & Jquery | Views: 22766 | Comments: 1 | Tags:ASP.NET  javascript  web-config 
Constructors in .NET
Ashok Nalam
In this article we will see about constructors in .net. and types of constructors with sample example.
By: Ashok Nalam | 01 Jan 2013 | VB.NET | Views: 8496 | Comments: 0 | Tags:C#  constructor  oops 
Display “No Records Found” text in gridview when there is no record
Ashok Nalam
In this snippet we will see how to show “No Records Found” text in gridview when there is no record with grid view headers.
By: Ashok Nalam | 03 Jan 2013 | ASP.NET | Views: 87552 | Comments: 1 | Tags:C#  gridview 
Get SharePoint Site template names using Get-SPWebTemplate command
Ashok Nalam
The article provides information about Get-SPWebTemplate command and how to get list of templates available in SharePoint.
By: Ashok Nalam | 26 Mar 2013 | Sharepoint | Views: 24856 | Comments: 0 | Tags:commands  powershell 
_spPageContextInfo javascript variable in sharepoint
Ashok Nalam
_spPageContextInfo variable provides few properties which will be useful in JavaScript and client object model code.
By: Ashok Nalam | 28 Mar 2013 | Silverlight | Views: 28529 | Comments: 0 | Tags:javascript  list  properties 
Bulk import in SQL Server 2008 from CSV file
Maram Kiran Kumar
By: Maram Kiran Kumar | 15 Apr 2013 | SQL Server | Views: 6235 | Comments: 0 | Tags:Bulk import  CSV file  SQL Server 
SharePoint AspMenu control set href location to new window/tab using siteMapNode
Ashok Nalam
By: Ashok Nalam | 01 May 2013 | Sharepoint | Views: 22282 | Comments: 0 | Tags:ASP.NET  control  menu  sitemap 
ASP.NET GridView - Displaying custom paging summary in footer and setting fixed height when less number of rows in page or no data to dispaly
Ashok Nalam
This article resolves how to set fixed height for GridView dynamically when there are less number of rows in a page or on empty data and displaying custom paging summary on pager template of GridView.
By: Ashok Nalam | 14 May 2013 | ASP.NET | Views: 123537 | Comments: 2 | Tags:control  gridview  paging 
12345
 
 
cheap jordans|wholesale air max|wholesale jordans|wholesale jewelry|wholesale jerseys