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 4110342
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T21:55:18+00:00 2026-05-20T21:55:18+00:00

I have to write an ASP page that has connection to 1 database and

  • 0

I have to write an ASP page that has connection to 1 database and then queries two tables one which has the header detail in and then the second which has the order lines in, each table has a ORDER_NUMNER.

These Tables contain a sales orders which I need to print out into an HTML page any help on this would be great as ASP is not my main language.

  • 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-05-20T21:55:18+00:00Added an answer on May 20, 2026 at 9:55 pm

    In general:

    Instantiate and open your database connection: (see http://www.connectionstrings.com for more information)

    dim conn
    conn.open "your connection string goes here"
    

    Open a recordset for the master table and detail table:

    dim rst
    rst.open "select * from tblMaster left join tblDetail on tblMaster.ORDER_NUMBER = tblDetail.ORDER_NUMBER where ORDER_NUMBER = 4",conn,1,3
    

    Exit out of there are not records

    if rst.eof then
       rst.close
       conn.close
       Response.end
    end if
    

    Print header info (for fields order_date, order_number, and order_company:

    response.write "Company: " & rst.fields("order_company") & "<br>"
    response.write "Date: " & rst.fields("order_date") & "<br>"
    response.write "Order Number: " & rst.fields("order_number") & "<br>"
    

    Loop through records, reading all records from detail table: (for fields item_desc, item_qty, item_cost)

    while not rst.eof
        response.write "Item: " & rst.fields("item_desc") & "<br>"
        response.write "Qty: " & rst.fields("item_qty") & "<br>"
        response.write "Cost: " & rst.fields("item_cost") & "<br>"
        rst.MoveNext
    wend
    

    Close the recordset

    rst.close
    

    Close the connection

    conn.close
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an ASP.Net page that has a button that when clicked I would
my Problem is that I have an asp text box which has a value
i have to create one asp.net mvc page that will show template of controls.
I have an ASP.NET web page that has an advanced search tab. Within this
I have an ambitious requirement for an asp.net 2.0 web page that contains a
I have an ASP.Net application that has a UserControl that needs to be rendered
I have a page that has to render a huge set of query results
I have a asp.net webservice running in windows server 2003, i want it read/write
I have created firstly ASP.NET MVC 2 . and write more functionality. After I
Lets say I have the following pages: # Include.asp <% Response.Write IsIncluded() & <br>

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.