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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T11:00:15+00:00 2026-06-18T11:00:15+00:00

I have a web app I am building that has primarily multiple choice questions

  • 0

I have a web app I am building that has primarily multiple choice questions with a few short answers. As is all the answers are put into the database via stored procedure, and then are extracted and corrected using a different procedure. While the short answer questions are included in the queries they are not being printed to the page, instead i have them also stored in a session variable and and printed in their respective textboxes, the problem is the reviewer can no longer see them if the session is timed out. So I am wondering how in VB.net do you extract a specific row from a query and then work with it from there.

this is what i have currently

    Dim P2Ans As String
    P2Ans = Session("Part2")
    Dim Part2Txt As New ArrayList(P2Ans.Split("|"c))
    Normal.Text = Part2Txt(0)
    Normal2.Text = Part2Txt(1)
    Normal3.Text = Part2Txt(2)

what i want is something like this

    Dim P2Ans As String
    P2Ans = Select.Tables(Answers).Where("QuestionID =X") 'from there take the answer out of the column "Question Answer"

    Dim Part2Txt As New ArrayList(P2Ans.Split("|"c))
    Normal.Text = Part2Txt(0)
    Normal2.Text = Part2Txt(1)
    Normal3.Text = Part2Txt(2)

i dont know if this is possible or best practice, so any advice would be great.

my answer: something like this

        Dim queryString As String = "SELECT questionAnswer FROM Submissions where   submissionid =" + SID + "and questionNumber = 1"
        Using connection As New SqlConnection(My.Settings.ConnString)
            Dim command As New SqlCommand(queryString, connection)
            connection.Open()
            Dim reader As SqlDataReader = command.ExecuteReader()
  • 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-18T11:00:18+00:00Added an answer on June 18, 2026 at 11:00 am

    You could use an SqlCommand object, pass it the query (i.e. SELECT answer FROM answers WHERE questionid = ‘x’) and then use SqlDataReader to retrieve the answer and save it to a variable and / or control on your form.

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

Sidebar

Related Questions

I have a web app that has standard user model information. I am building
I have a web app I'm building that has about 50 forms. I have
I'm currently building a web-app that has one section where the user sees a
I am building a Django powered web app that has a large database component.
I'm building a web app that has php files spread out through different directories,
I've got a web app I'm building in ASP.NET that has the following security
I am building a kind of calender web app I have set up the
I am building an iPhone app, and I am trying to have a web
I have a web-app with a Java back-end that uses Tomcat jdbc-pool for database
I have a web app that runs fine in Visual web developer. But when

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.