Tuesday, 22 September 2015

                             SQL Query to write A to Z 

                     Without Knowing the ASCII value of any Character



 declare @start int,@stop int     --We declare start and stop variable to hold from and to value
set @start= ASCII('a')              --We get ASCII value of 'a' in start variable
set @stop= ASCII('z')              --We get ASCII value of 'a' in start variable
while(@stop>=@start)             --We start loop. Loop terminate if start value is greater than stop value
begin
print CHAR(@start)
set @start=@start + 1
end





Now If you want to print A to Z means in Capital then we should set 

set @start= ASCII('A') 
set @stop= ASCII('z')  

And rest code will be the same.

Also we can use This code to print all numbers between two numbers.

Friday, 15 May 2015

Saturday, 28 February 2015

Ado.Net is not a different technology. It is part of Asp.Net. It basically helps us to provide communication with back end data using front end controls.
Front end technology like C# and Back end technology like Sql server.We can use Ado.Net for fetching data from data services based on disconnected DataSets and XML.
ADO.NET is an object-oriented set of libraries that allows you to interact with data sources. Commonly, the data source is a database, but it could also be a text file, an Excel spreadsheet, or an XML file.