Wednesday 3 July 2013

Add and Remove Dynamic Control using Jquery

$('#<%=btnRemove.ClientID %>').live('click', function () {

                var rowCount = $('#tblAccount tr').length;
                if (rowCount < 2) {
                    alert('There is No Data For Delete !');
                    return false;
                }
                else {
                    var $this = $(this),
                $parentTR = $this.closest('tr');
                    $parentTR.remove();
                }
            });
            $('#<%=btnAddAnother.ClientID %>').live('click', function () {


                var $this = $(this),
                $parentTR = $this.closest('tr');
                $parentTR.clone().insertAfter($parentTR);

                return false;
            });

Tuesday 18 June 2013

To Check How May Connections are open in your Sql Server..

SELECT      DB_NAME(dbid) as DBName,      COUNT(dbid) as NumberOfConnections,     loginame as LoginName FROM     sys.sysprocesses WHERE      dbid > 0 GROUP BY      dbid, loginame

Thursday 28 March 2013

Implement Data Integrity in Sql Server


create table (TabelName)(
 RegNo int constraint pkey primary key,
 StuID int unique,
 SName char (20),
 sAge int constraint chage check (sage between 15 and 25),
 sCity char(20)check(scity in ('jaipur','kota')),
 sphone char (12)check (sphone like '[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]'),
 sstate char (20) default 'Rajasthan'
 )
Select * from (TableName)