Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7734401
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T07:14:24+00:00 2026-06-01T07:14:24+00:00

I made a query that retrieve a list of items from a database: CREATE

  • 0

I made a query that retrieve a list of items from a database:

    CREATE PROCEDURE dbo.GetSubjects(@DayComing varchar(10) , @UserId varchar(3))
    AS
IF EXISTS(
    SELECT        Std_ID
    FROM            Student
    WHERE Std_ID = @UserID) 
    BEGIN

    SELECT        TimeTable.Ttb_Subject 
    FROM            Student INNER JOIN
                       Class ON Student.Std_Class = Class.Cls_ID INNER JOIN
                       TimeTable ON Class.Cls_ID = TimeTable.Ttb_Class
     WHERE        (TimeTable.Ttb_WeekDay = @DayComing) AND (Student.Std_ID = @UserID)

     END
     ELSE BEGIN

     SELECT        TimeTable.Ttb_Subject, TimeTable.Ttb_Class
     FROM            Teacher INNER JOIN
                        TimeTable ON Teacher.Tch_ID = TimeTable.Ttb_Teacher
     WHERE        (TimeTable.Ttb_WeekDay = @DayComing)

     END

Now I want to show m at asp page, but I don’t know how can I do it. Do you know any tutorials that can help me with this ?

Thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T07:14:26+00:00Added an answer on June 1, 2026 at 7:14 am

    You have several options, for example Linq2Sql, Linq2EF, ADO.NET, some other framework…

    Here’s a tut on how to accomplish this with ado.net:
    http://www.codeproject.com/Articles/15403/Calling-Stored-procedures-in-ADO-NET

    Here’s how you do it with Linq 2 SQL:
    http://weblogs.asp.net/scottgu/archive/2007/08/16/linq-to-sql-part-6-retrieving-data-using-stored-procedures.aspx

    And Linq 2 Entity framework:
    http://msdn.microsoft.com/en-us/data/gg699321

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to create a generic list from a specific Type that is retrieved
I made query that accepts two parameters. Now I want to use that query
I have made a form that accepts query and executes it through php. I
So I made a query like this global $connection; $query = SELECT * FROM
I am using the Moodle database to query the latest forum posts made by
I was using the following code to retrieve HTML snippets from a database table
I want to retrieve the email address from the table and using that to
I have a very simple SQL query that I made which retrieves some user
I made a query that is joining the same table - users- twice, with
I want to log my query times for each time when a query made.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.