Retrieving Data from a Stored Procedure

Stored procedures frequently return data from a database. They can return single values, tables joined together, or all the records from a single value, and much more. You can call stored procedures that return data from your ASP.NET pages. This technique shows you how to do that..The stored procedure defined in the SQL Server database has this definition:CREATE PROCEDURE CurrentMonthBirthDays AS Select * from Employees Where Month(BirthDate) = Month(GetDate())Notice that the GetDate function, which returns the current system date, is used to see if the month of that date matches the month of the birth date.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: