How to: Classic ASP - Passing 'multiple' recordset values to another page? [Answered]RSS

8 replies

Last post May 23, 2011 05:50 PM by PropheC

  • How to: Classic ASP - Passing 'multiple' recordset values to another page?

    May 18, 2011 09:01 PM|PropheC|LINK

    Essentially what I have to contend with in code is as follow... response.write objRS.Fields("TheID").value + ", " The above snippet populates a record set until EOF with multiple ID's comma separated (TheID, TheID, TheID...etc) The issues is to now pass all of these to another form in a textbox or other to later be edited. I thought about my typical approach of querystring however ran into an issue with retrieving all of the values since they are loaded into a recordset. I think the only other way is populating the recordset in a textbox so that on the receiving page, I can use request.forms object with the form name however I was unable to populate a single textbox with each of the values from a recodset... If any fellow coder has suggestions for this classic asp nightmare, Ideas, URLs etc... It'd be greatly appreciated. Thanks in advance.

    classic asp record set textbox

  • Re: How to: Classic ASP - Passing 'multiple' recordset values to another page?

    May 19, 2011 11:57 AM|PropheC|LINK

    Interestingly I found this article which explained my suspicion passing recordset values can't be done exclusively :

    http://www.devx.com/tips/Tip/25880

    So I'm now thinking the only way is to pass it as an array

    http://www.4guysfromrolla.com/webtech/101999-1.shtml

    Which works! however now the issue is to load this array into editable regions that can be updated on a SQL Server 2000 backend.

    ...any ideas?

    thanks

    textbox arrays sql server 2000 editable regions

  • Re: How to: Classic ASP - Passing 'multiple' recordset values to another page?

    May 19, 2011 06:06 PM|tomkmvp|LINK

    I would like to help but I am having a hard time understanding what you are trying to do.  Can you give a specific/detailed example?

    Tom Kaminski (former IIS MVP 2002-2010)
    http://mvp.support.microsoft.com/
  • Re: How to: Classic ASP - Passing 'multiple' recordset values to another page?

    May 20, 2011 10:05 AM|PropheC|LINK

    Thanks for the gesture. Being a younger .NET centric Web Developer, I have just complete forgot about classic asp and frankly didn't learn it as I came aboard just as ASP.NET and .NET in general was being releases in 1.1.

    Anyhow, I am executing a storedprocedure and spitting out an array of IDs (IDNumber)

    My problem was... and could still be, that I have to forward this information to another page with these values to be edited later.

    My original thought is why not use the querystring to pass these values along and then on the receiving page, extract the values and pupulate a textbox?

    It works!

    However, My issue now is populating a control (textbox) in classic ASP with these values as I am getting a syntax error!

    Expected ')'

    I have done this plenty of times in ASP.NET however with this particular project in classic ASP, I forget the double, single quotes and its truncating to my young eyes.

    <%

    for i = 1 to Request.QueryString("id").Count

    response.Write("<INPUT type=text ID=Text1 NAME=Text1 value= request.querystring("id")(i)" & "/>" & Request.QueryString ("id")(i) & "<br/>")

    next

    %>

  • Re: How to: Classic ASP - Passing 'multiple' recordset values to another page?

    May 20, 2011 11:11 AM|PropheC|LINK

    UPDATE

    I found this article that I like and it should help... stay posted!

    http://www.kamath.com/columns/squareone/so003_aspvalues.asp

     UPDATE

    Forgot that just doing a

    <%response.write(request.url.querystring("ID"))%> returns all values and... the textbox's value can be set to this! Progress!

    ...stay tyuned

  • Re: How to: Classic ASP - Passing 'multiple' recordset values to another page?

    May 20, 2011 01:33 PM|PropheC|LINK

    UPDATE

    "inching closer!"

    I have a for each statement in vbscript which yields the appropricate count of textboxes but the value is ONLY the first value in the querystring, not all of them....

    <% 

     For each ID in Request.url.querystring(ID)

    response.write("<input name=txtbox id=txtbox value=" + Request.querystring(ID) + "   />")

    Next

    %>

    any ideas?

  • Re: How to: Classic ASP - Passing 'multiple' recordset values to another page?

    May 23, 2011 02:30 AM|Leo Tang - MSFT|LINK

    Hi,

    Could you please post the original query string here?

    Or how did you build the query string?

    Thanks.

    Please mark the replies as answers if they help or unmark if not.
    Feedback to us


  • Re: How to: Classic ASP - Passing 'multiple' recordset values to another page?

    May 23, 2011 10:08 AM|tomkmvp|LINK

    Request.url.querystring(ID) is a value not an object so the For Each isn't really going to work.  What does this data look like?  I suspect you can use the Split() function to load the values into an array ...

    Tom Kaminski (former IIS MVP 2002-2010)
    http://mvp.support.microsoft.com/
  • Re: How to: Classic ASP - Passing 'multiple' recordset values to another page?

    May 23, 2011 05:50 PM|PropheC|LINK

    Too late now, turns out this "20yrs of experience programmer" who had the same scenario with up to 4 other contractors before me, decided no progress was being made. ...so I am now on the market in the Atlanta,Ga area. asp.NET! - Contact with any leads. http://www.linkedin.com/in/mcjames Thanks