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

  • Home
  • SEARCH
  • 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 8286177
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T11:38:57+00:00 2026-06-08T11:38:57+00:00

I have saved a really big QueryString into a MS SQL column the string

  • 0

I have saved a really big QueryString into a MS SQL column the string looks something like this:

&s1=Toledo,OH&s2=Chicago,IL&s3=Madison,WI.....and so on...

I would like to be able to do/have something like this in ASP-Classic:

Dim s1,s2,s3,s4....and son on...

s1="Toledo,OH"
s2="Chicago,IL"
s3="Madison,WI"
.....and son on.....

I would like to be able to call them like I would a QueryString for example a QueryString call would be Request.QueryString(“s1”) or I can use Do and loop all of the Request.QueryString(“s” & i) until the query =”” then I would Exit the Do.

But how would I make all of this happen if I saved it the query.string into a MS DB Column?

Please help,

Thank you…

I keep getting this error: Variable is undefined: ‘s1’, what am I doing wrong here ?

    Function qq(s)
      qq = """" & s & """"
    End Function ' qq


    Dim sInp    : sInp        = objRSConnSAVE("QSTRING")
      Dim dicData : Set dicData = Server.CreateObject("Scripting.Dictionary")
      Dim oRE     : Set oRE     = New RegExp
      oRE.Global  = True
      oRE.Pattern = "&([^=]+)=([^&]*)"
      Dim oMTS    : Set oMTS    = oRE.Execute(sInp)
      Dim oMT
      For Each oMT In oMTS
          dicData(oMT.SubMatches(0)) = oMT.SubMatches(1)
      Next

      Dim sKey, sValue
        For Each sKey In dicData.Keys
          sValue = dicData(sKey)
         '''// Response.write qq(sKey) & "=>" & qq(sValue)

      Next

    Response.write "TEST" & s1
   '// I even tried Response.write "TEST" & s(1) same error, how do I call it ?
  • 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-08T11:38:59+00:00Added an answer on June 8, 2026 at 11:38 am

    Use a RegExp (instead of Split) and a dictionary (instead of a bunch of scalar variables):

      Dim sInp    : sInp        = "&s1=Toledo,OH&s2=Chicago,IL&s3=Madison,WI"
      Dim dicData : Set dicData = CreateObject("Scripting.Dictionary")
      Dim oRE     : Set oRE     = New RegExp
      oRE.Global  = True
      oRE.Pattern = "&([^=]+)=([^&]*)"
      Dim oMTS    : Set oMTS    = oRE.Execute(sInp)
      Dim oMT
      For Each oMT In oMTS
          dicData(oMT.SubMatches(0)) = oMT.SubMatches(1)
      Next
      Dim sKey, sValue
      For Each sKey In dicData.Keys
          sValue = dicData(sKey)
          WScript.Echo qq(sKey), "=>", qq(sValue)
      Next
    

    output:

    "s1" => "Toledo,OH"
    "s2" => "Chicago,IL"
    "s3" => "Madison,WI"
    

    UPDATE:

    qq() is a function to double quote a string:

    Function qq(s)
      qq = """" & s & """"
    End Function ' qq
    

    UPDATE II:

    Use dicData("s2") to get Chicago,IL

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

Sidebar

Related Questions

I have saved a dataset in the sql database in an xml column using
I have a website that just takes a really big form and saves the
I have saved an image path in database like so: C:\Users\3embed\Documents\Visual Studio 2010\Projects\HeritageWeb\HeritageWeb\Images\startbutton.png I
I have a really big data structure with a lot of fields in it.
First, I'd like to say that I really love NoSQL & MongoDB but I've
first i want to say that this site has been a really big help
I have a set of really big images out of which I need to
I have a really big problem on my hands. I spend a week rewriting
I have a Service model with title:string description:string date:datetime. I would like to implement
Say I have: >which -a foo /bin/foo /usr/bin/foo I want something like: >foo Warning:

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.