Posts

Showing posts from August, 2012

What is a trusted connection?

Net-Lib (The Microsoft SQL Server Network Library) is also able to support the impersonation of a logged in user's security context for protocols that support authenticated connections (called trusted connections). This allows Net-Lib to provide an integrated logon authentication mechanism via the use of Windows Authentication. Windows Authentication is not supported on Windows 98 or Windows Me.

how to subtract value at previous row from current row?

Table data is like....  ------------------------------ EmpID    Emp_Name    Salary ------------------------------- 1             Mark             4000 2             Twin              2000 3             Aleganja        3000 4             Peter             8000 ------------------------------- Method (1) ------------------------------------ -  select top 1 EmpID,SALARY from Employee  union  SELECT e1.EmpID,(e2.Salary - e1.Salary) AS SALARY FROM Employee e1  INNER JOIN ...

End Date should not be less than Start Date using jQuery Date Picker

set maxDate: '0d' if you want to set your range with current date. $(document).ready(function(){ $("#txtFromDate").datepicker({ maxDate: '0d', numberOfMonths: 2, onSelect: function(selected) { $("#txtToDate").datepicker("option","minDate", selected) } }); $("#txtToDate").datepicker({  maxDate: '0d', numberOfMonths: 2, onSelect: function(selected) { $("#txtFromDate").datepicker("option","maxDate", selected) } }); });

How can I get column names from a table in sql server?

SELECT [name] FROM syscolumns WHERE id = (SELECT id FROM sysobjects WHERE type = 'U' AND [Name] = 'Your Table Name')