Friday 25 September 2015

Types of Data Type in C# dot net and Difference between Value Type and Reference Type.


 


Hello Friends,
                      In this Chapter we will discuss about Data Type in C# dot net and Difference between  Value Type and Reference Type.
Data Type:
                      In Dot net platform  our Data types are divided  into two types one is value type and anather  is Reference type.please follow  the following steps about its classifications.

Friday 18 September 2015

How to call a user define function(udf) from Store Procedure:-



Hello Friends,
                      In this Chapter  we will discussed  how  a function will be call  from  Store Procedure in Sql server.First we should know what types of function is availablein sqlserver.
Mainly there are two types of functions in sqlserver database 

1>System define function
2>User Define Function(UDF)

System define function:
           Basically System Define Functions are the built-in function which is provided by microsoft like aggregate function,Configuration function,cursor function,mathematical function,date and time functions  etc…
User Define Function(UDF):
      UDF is created by user mainly it categorized  into three types:
1>scalar function
      Scalar function is that types of function which return a single value through RETURN clause.
2>Inline table-valued function:
          But in Inline table-valued function  has no function body.It contains result set of single select statement and table valued function return a table
3>multistatement table-valued function:
               In  this function  function body defined in a Begin - End Block,which is contains transact-sql statements.
Next Chapter we will briefly discuse  with valuable example,But now I will create a simple scalar function  and call it from store procedure.please follow this step…….

Thursday 17 September 2015

What is the Difference between Storeprocedure and User Define Function(UDF) in Sqlserver :



 Hello Friends,                                                                                                                          
                  Previous Chapter I have described oop concept in C#.net but now I will expain anther concept in sqlserver i.e What is the difference  between Storeprocedure and Function.
Basically Storeprocedure  is a concept  through which to get /execute the quory on any database server and it can be invoked from any language code and 
                   Function is nothing but  it is a database object which handle different types of functionality.Next chapter I'll briefly describe about Storeprocedure and Function.
Difference between Storeprocedure and User Define Function(UDF):
Store Procedure
User Define Function(UDF)
1
Store procedure is a pre-compiled object ,which are compiled 1st time and it’s code is saved in that area  in which it executes.when it is called it become execute.
1
Function is compiled and executed every time ,when it is called.
2
Procedure can have both  input and out put parameters.
2
But Function  have only input parameter.
3
It is not possible to call procedure from Function.
3
But Function can call from Procedure.
4
Procedure can use select as well as DML(insert,update,delete) Commands or Statements.
4
Function can only use Select statement.
5
Procedure can use Try-Catch block to handle Exception.
5
Function can’t use Try-catch block.
6
Store Procedure may or may not return  any value.
6
Function must return  any value.


I have explained difference between Stored Procedure and Functions (UDF).So after read please Comments and suggestions.
Thanks & Regard
Rabi