naag Posted July 19, 2013 Share Posted July 19, 2013 hello... I have written a stored procedure to get a column Named as "Name" from the table DN_Software.The query is "Select Name From DN_Software Where DN_DiscoverHostID=5" for Particular ID. Now i want to display that list of names in front end page. please help me how to display using that stored procedure using asp.net displaying in c#.please... "ALTER PROCEDURE [dbo].[DN_Software_Read_Distinct_Name_By_DiscoveredHostID]( @Active [int], @DN_DiscoveredHostID Int) AS SELECT DISTINCT Name FROM DN_Software where DN_DiscoveredHostID = @DN_DiscoveredHostID --EXEC DN_Software_Read_Distinct_Name_By_DiscoveredHostID @Active = 1, @DN_DiscoveredHostID = 5" --------------this my stored procedure. Link to comment Share on other sites More sharing options...
justsomeguy Posted July 19, 2013 Share Posted July 19, 2013 Which part are you having problems with? Are you connecting to the database and running queries? You would execute a stored procedure the same way as another query, the syntax for the query is just slightly different. Link to comment Share on other sites More sharing options...
naag Posted July 22, 2013 Author Share Posted July 22, 2013 thankz for ur reply ....problem is to get the data from the stored procedure....sql connection is proper but im enable to get the data using stored procedure....???!!! Link to comment Share on other sites More sharing options...
justsomeguy Posted July 22, 2013 Share Posted July 22, 2013 There are some examples here: http://stackoverflow.com/questions/1260952/how-to-execute-a-stored-procedure-from-c-sharp-program 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now