Wednesday, 16 December 2015

CRUD operations,login and registration con



Hellow Friends,
                                Now I am going to describe  how to create your Simple Register form, Login form and How to make CRUD Operation which is very interesting concept  in asp.net using C# with mvc4 platform .It is very intresting concept in mvc.So Please Follow the steps.
Step-1
First create a table in your sql server database(suppose table name is userinfo) like this:
Step-2
Create a store procedure which name is sp_insertpro:

create Procedure sp_insertpro
(
@name varchar(50)=null,
@emailid varchar(50)=null,
@password varchar(50)=null,
@age varchar(50)=null,
@address varchar(50)=null
)
AS
Begin
set nocount on

begin
      Insert Into userinfo(Name,emailid,password,Address) values(@name,@emailid,@password, @address)
end
End

Tuesday, 15 December 2015

Reverse a string using recursion


 Hellow Friends,
                                Now I am going to describe  how to reverse a string with using  recursion function.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace recersfunction
{
    class recursionstring
    {
   public void reversestring(string str)
  {
    if(str.Length > 0) 
      reversestring(str.Substring(1, str.Length-1));
    else 
     return;
  }
}

Friday, 11 December 2015

CRUD operation ,login and registration in asp.net using c# with mvc4 platform



Hellow Friends,
                                Now I am going to describe  how to create your Simple Register form, Login form and How to make CRUD Operation which is very interesting concept  in asp.net using C# with mvc4 platform .It is very intresting concept in mvc.So Please Follow the steps.
Step-1
First create a table in your sql server database(suppose table name is userinfo) like this:

Step-2
Create a store procedure which name is sp_insertpro:

create Procedure sp_insertpro
(
@userid int,
@name varchar(50)=null,
@emailid varchar(50)=null,
@password varchar(50)=null,

@age varchar(50)=null,
@address varchar(50)=null
)
AS
Begin
set nocount on

begin
      Insert Into userinfo(Name,emailid,password,Address) values(@name,@emailid,@password, @address)
end
End

Tuesday, 8 December 2015

CRUD Operation in Asp.net in C# using store procedure in 6 steps:-



Hello Friends,
                      In this Chapter we will discuss about CRUD operations of  asp.net in c# using store procedure.

Step-1
Create a table like below (suppose table name is emp):
Step-2
Write the following code to create a store procedure for CRUD operation:
CREATE PROCEDURE dbo.gridoperate
       @qtype varchar(10),
       @id int=null,
       @name varchar(50)=null,
       @ads varchar(50)=null
AS
begin
SET NOCOUNT ON
--select
if (@qtype ='select')
begin
select id,name,ads from emp
end
--insert
if(@qtype ='insert')
begin
insert into emp(name,ads)values(@name,@ads)
end
--update
if(@qtype ='update')
begin
update emp set name=@name,ads=@ads where id=@id
end
--delete
if(@qtype ='delete')
begin
delete from emp where id=@id
end
end

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