anil kumar

anil kumar

  • NA
  • 51
  • 1.2k

how to fatch data in list box using sql server str procedure

Feb 11 2014 3:35 AM
hiii!!! i want to fatch data in list box.. the selection based on dropdown list .. if we select value in drop down then required data will be fatch in list box.. the required data will be fatch accroding to userttype value  ..the values of usertype=1,2.  i m using 3 layer architecture...



my store procedure
USE [SCJ]
GO
/****** Object:  StoredProcedure [dbo].[sp_sendmail]    Script Date: 02/10/2014 12:34:17 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
-- =============================================
-- Author:<Author,,Name>
-- Create date: <Create Date,,>
-- Description:<Description,,>
-- =============================================
ALTER PROCEDURE [dbo].[sp_sendmail] 
-- Add the parameters for the stored procedure here
(
@usertype INT
--@emailid nvarchar(50)='',

)
AS
BEGIN
-- SET NOCOUNT ON added to prevent extra result sets from
-- interfering with SELECT statements.
SET NOCOUNT ON;
     BEGIN
    -- Insert statements for procedure here
    if(@usertype='usertype')
   SELECT emailid from Login_User_Info where LTRIM(RTRIM(usertype)) = LTRIM(RTRIM(@usertype)) 
 
END
END



Answers (1)