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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T01:49:44+00:00 2026-05-23T01:49:44+00:00

How would you go about getting user input for a connection over different webpages.

  • 0

How would you go about getting user input for a connection over different webpages. Would this be done with session variables or is there another way. I dont want to have to set up connections on every webpage, can someone point me in the right direction what to do some research into.

Here is a bit of code from a site that does not have any connection strings at all on the web site.

obj_ADO.ClearParameters
lng_RecSet1 = obj_ADO.GetFreeRecordset
obj_ADO.Recordset "A_combo_Permissions_select", adCmdStoredProc, obj_Session.int_CommandTimeout, lng_RecSet1
while obj_ADO.EOF(lng_RecSet1) = 0

and

if str_Action = obj_Session.str_FileName or len(str_Action)=0 or str_Action = str_SwitchLangText then

obj_ADO.ClearParameters
obj_ADO.AddParameter "SessionID", adChar, adParamInput, len(obj_Session.str_SessionID), obj_Session.str_SessionID
obj_ADO.AddParameter "PermissionID", adInteger, adParamInput, 8, lng_PermissionID
lng_RecSet = obj_ADO.GetFreeRecordset
obj_ADO.Recordset "A_PagePermissions_select", adCmdStoredProc, obj_Session.int_CommandTimeout, lng_RecSet
  • 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-23T01:49:45+00:00Added an answer on May 23, 2026 at 1:49 am

    Database connection

    it’s normal to adopt a custom library that at least as the methods to open connection, execute query and close connection

    Example:

    <%
        '' Database file database.asp
    
        Sub openDB(query, objConn, objRS)
    
            Set objConn = Server.CreateObject("ADODB.Connection")
            objConn.ConnectionString = "DSN=myCONNECTION.dsn"
            objConn.Open
    
            Set objRS = Server.CreateObject("ADODB.Recordset")
            objRS.Open query, objConn
    
        End Sub
    
        Sub CloseRs(objRS)
    
            objRS.Close
            Set objRS = Nothing
    
        End Sub
    
        Sub CloseDb(objConn)
    
            objConn.Close
            Set objConn = Nothing
    
        End Sub
    
    %>
    

    then you can simple use:

    <!--#include file="header.inc"-->
    <%
        Dim rs, conn
        openDb("SELECT Name FROM TBL_USERS", conn, rs)
    
        '' you can loop through the rs object now
        while NOT rs.EOF
    
            Response.Write rs("Name")
    
            rs.MoveNext
        wend
    
        closeRs(rs)
        closeDb(conn)
    %>
    

    (old post message as I did not saw the sql tag

    In Classic ASP it always ends up using

    Request.QueryString("myInput") or Request.Forms("myInput") or yet a 2-in-1 Request("myInput") and work from there

    “Connections” are made by links and form Post’s / Get’s

    There are plenty of examples on the web, but here’s one

    To keep variables across pages you have (as still today) 3 ways

    • Session variable, it leaves per user session
    • Application variable, it leaves per website and it’s shared cross all users
    • Cookies

    for example, the “Authorized Page access” is made by setting a Session upon the correct login, forward using Response.Redirect("myProtectedPage.asp") and in that page normally looks like:

    <%
        If Session("user-login") = True Then
            Response.Redirect("NotAuthorized.asp")
        End if
    %>
    <!--#include file="header.inc"-->
    ...
    

    more here

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

Sidebar

Related Questions

How would I go about getting the Windows user credentials from a Swing application?
How exactly would one go about getting an OpenGL app to run fullscreen straight
http://t-webdesign.co.uk/new/ How would i go about getting the grey div (#content_right) to expand to
Just a quick question about how you would go about implementing this. I want
I'm wondering how i would go about making the following application: a user signs
Using the Facebook C# SDK by Nathan Totten, how would I go about getting
How would I go about getting a value from a column in a table
Just wondering how you would go about implementing something similar to stackoverflow'd related questions.
Any ideas how I would go about writing a javascript method to insert an
I would like to know how I would go about altering the HTML that

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.