Help with ASP


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: Help with ASP

  1. #1
    bs Guest

    Help with ASP


    I have a couple of things that I need answered. Sooner the better. I need
    code samples for these questions, so I can understand it better.

    1) Retrieve a user's question from a submitted form using the Request.Form
    object and store it in a variable named strQuestion.
    2) Response.write to display the user's question on a page.
    3) Use Server.CreateObject method to create a connection object with variable
    name "Conn"
    4) Use Open method of the connection object to open database
    5) Use Server.CreateObject method to create a recordset object with variable
    name "RS"
    6) Use Rnd function to randomly select a number between 1 and the number
    of records in the table(5) and assign the value to a variable named intIndex.
    7) Use Absolute Position method of the recordset to move to the selected
    index.
    8) Display the selected answer in the web page using the Response.write
    method.
    9) Close the recordset object using it Close method.
    10) Close the connection object using its Close method.
    11) Set the Rs variable to nothing to free up resources.
    12) Set the Conn variable to nothing to free up resources.

    This much help would be greatly appreciated. Please!!!!


  2. #2
    John Cantley Guest

    Re: Help with ASP

    Try www.asp101.com

    jc
    "bs" <bsu24@yahoo.com> wrote in message news:3a36d07e$1@news.devx.com...
    >
    > I have a couple of things that I need answered. Sooner the better. I

    need
    > code samples for these questions, so I can understand it better.
    >
    > 1) Retrieve a user's question from a submitted form using the

    Request.Form
    > object and store it in a variable named strQuestion.
    > 2) Response.write to display the user's question on a page.
    > 3) Use Server.CreateObject method to create a connection object with

    variable
    > name "Conn"
    > 4) Use Open method of the connection object to open database
    > 5) Use Server.CreateObject method to create a recordset object with

    variable
    > name "RS"
    > 6) Use Rnd function to randomly select a number between 1 and the

    number
    > of records in the table(5) and assign the value to a variable named

    intIndex.
    > 7) Use Absolute Position method of the recordset to move to the

    selected
    > index.
    > 8) Display the selected answer in the web page using the Response.write
    > method.
    > 9) Close the recordset object using it Close method.
    > 10) Close the connection object using its Close method.
    > 11) Set the Rs variable to nothing to free up resources.
    > 12) Set the Conn variable to nothing to free up resources.
    >
    > This much help would be greatly appreciated. Please!!!!
    >




Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center