Monthly Archives: September 2011

Transaction in Ado.Net

Transaction is the collection of Commands. Transaction work on nothing or All function. Means if a command fails then all command fails . Steps to Put Transaction in Ado.net Setp1 : create the sqlTransaction object Step 2: Define the Connection … Continue reading

Posted in Asp.Net, Sql | Leave a comment

Age Calculate using Sql Query(Age Function in sql)

Step1 – Create Function fn_GetAge           Step 2: Call this Functin    

Posted in Sql | Leave a comment

Execute Store procedure form Csharp (System.Diagnostics.Process)

Step1 :   Create a Query for creating a table and name this query Proc.sql and store it into C Drive     Step2 :    in .CS file copy and paste this code //change your dbname     Step 3: For … Continue reading

Posted in Asp.Net, Sql | 1 Comment

trigger in sql(after trigger)

Update one Table after insert or update data into another Table   here We Have Two Tables table1 and table2,and we want to udpate table2 using after trigger   Step1 create table1     Step2 create table2   Step3 create … Continue reading

Posted in Sql | Leave a comment

update data from one table to another using join

— update data from one table to another using join

Posted in Sql | Leave a comment

cursor in sql

–Declare Cursor

Posted in Sql | Leave a comment