Jump to content

displaying data from sql using C# with asp.net


naag

Recommended Posts

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

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

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...