vikas kanani

vikas kanani

  • NA
  • 149
  • 115.1k

Store procedure for desktop application

Nov 8 2012 9:02 AM
ALTER procedure [dbo].[one_mnth_ago]
as


DECLARE @StartDate DATETIME, @EndDate DATETIME
SET @StartDate = dateadd(mm, 0, getdate())
SET @StartDate = dateadd(dd, datepart(dd, getdate())*0, @StartDate)
SET @EndDate = dateadd(mm, 1, @StartDate)


begin


SELECT *
FROM installation
WHERE warranty_expry_date BETWEEN @StartDate AND @EndDate
end




how to run this procedure in desktop application.and retrieve data in gridview

Answers (2)