Ask a Question related to ASP Database, Design and Development.

  1. #1

    Default Once again

    If you have followed my previous posts, you will know that I am working with
    some arrays in a page. Thanks to all who have helped me out so far.

    Now I am creating an array from a database then a string from the array. The
    values are being returned correctly.

    arrID = objRs3.GetRows

    for a = 0 to uBound(arrID,2)
    for b = 0 to uBound(arrID,1)
    strVal = strVal & " " & arrID(b,a)
    next
    strVal = strVal & ","
    next
    strVal = Left(strVal, Len(strVal) -1)
    parArray = split(StrVal, ",")

    I am trying to create a parameterized link to another page:

    for i = 0 to uBound(parArray)
    response.write "<param name='"somevalue"'
    value=""http://www.domainname.com/score.asp?par='"&parArray(i)&"' "">"
    next

    The link is generated, but when I click on it, it goes to the page but the
    query string reads:

    [url]http://www.domainname.com/score.asp?par='%202[/url]'

    Could someone take a look, and tell me where I am going wrong here?

    TIA

    Steve G


    Steve G Guest

  2. #2

    Default Re: Once again

    "Steve G" <steve@nospam.tnccreations.com> wrote in message
    news:e#KV4dzlDHA.1884@TK2MSFTNGP09.phx.gbl...
    > If you have followed my previous posts, you will know that I am working
    with
    > some arrays in a page. Thanks to all who have helped me out so far.
    >
    > Now I am creating an array from a database then a string from the array.
    The
    > values are being returned correctly.
    >
    > arrID = objRs3.GetRows
    >
    > for a = 0 to uBound(arrID,2)
    > for b = 0 to uBound(arrID,1)
    > strVal = strVal & " " & arrID(b,a)
    > next
    > strVal = strVal & ","
    > next
    > strVal = Left(strVal, Len(strVal) -1)
    > parArray = split(StrVal, ",")
    >
    > I am trying to create a parameterized link to another page:
    >
    > for i = 0 to uBound(parArray)
    > response.write "<param name='"somevalue"'
    > value=""http://www.domainname.com/score.asp?par='"&parArray(i)&"' "">"
    > next
    >
    > The link is generated, but when I click on it, it goes to the page but the
    > query string reads:
    >
    > [url]http://www.domainname.com/score.asp?par='%202[/url]'
    >
    > Could someone take a look, and tell me where I am going wrong here?
    >
    > TIA
    >
    > Steve G
    "%20" = a space.

    My guess is that the "StrVal" contains " 2".

    What does a Response.Write show before the "split()"?


    McKirahan Guest

  3. #3

    Default Re: Once again

    What's the value of parArray(i)? Is it 2? If so, there's a space in your
    url for some reason. Try trimming your values. Also, your code below is a
    bit syntactically incorrect. I don't know if copied and pasted or just
    rewrote it or what, but it should look more like:


    for i = 0 to uBound(parArray)
    response.write "<param name='" & somevalue & "'
    value=""http://www.domainname.com/score.asp?par='" & parArray(i) & "' "">"
    next

    Furthmore, you may want to look into the getString method.
    [url]http://msdn.microsoft.com/library/en-us/ado270/htm/mdamth02_11.asp[/url]

    Ray at work



    "Steve G" <steve@nospam.tnccreations.com> wrote in message
    news:e%23KV4dzlDHA.1884@TK2MSFTNGP09.phx.gbl...
    > If you have followed my previous posts, you will know that I am working
    with
    > some arrays in a page. Thanks to all who have helped me out so far.
    >
    > Now I am creating an array from a database then a string from the array.
    The
    > values are being returned correctly.
    >
    > arrID = objRs3.GetRows
    >
    > for a = 0 to uBound(arrID,2)
    > for b = 0 to uBound(arrID,1)
    > strVal = strVal & " " & arrID(b,a)
    > next
    > strVal = strVal & ","
    > next
    > strVal = Left(strVal, Len(strVal) -1)
    > parArray = split(StrVal, ",")
    >
    > I am trying to create a parameterized link to another page:
    >
    > for i = 0 to uBound(parArray)
    > response.write "<param name='"somevalue"'
    > value=""http://www.domainname.com/score.asp?par='"&parArray(i)&"' "">"
    > next
    >
    > The link is generated, but when I click on it, it goes to the page but the
    > query string reads:
    >
    > [url]http://www.domainname.com/score.asp?par='%202[/url]'
    >
    > Could someone take a look, and tell me where I am going wrong here?
    >
    > TIA
    >
    > Steve G
    >
    >

    Ray at Guest

  4. #4

    Default Re: Once again

    I didn't read the previous thread.
    Are you taking your recordset and converting it into a string with the
    fields separated by spaces and the rows by commas?

    If so, I think you'll find this is faster....
    strVal=objRS3.GetString(,,","," ")

    "Steve G" <steve@nospam.tnccreations.com> wrote in message
    news:e%23KV4dzlDHA.1884@TK2MSFTNGP09.phx.gbl...
    > If you have followed my previous posts, you will know that I am working
    with
    > some arrays in a page. Thanks to all who have helped me out so far.
    >
    > Now I am creating an array from a database then a string from the array.
    The
    > values are being returned correctly.
    >
    > arrID = objRs3.GetRows
    >
    > for a = 0 to uBound(arrID,2)
    > for b = 0 to uBound(arrID,1)
    > strVal = strVal & " " & arrID(b,a)
    > next
    > strVal = strVal & ","
    > next
    > strVal = Left(strVal, Len(strVal) -1)
    > parArray = split(StrVal, ",")
    >
    > I am trying to create a parameterized link to another page:
    >
    > for i = 0 to uBound(parArray)
    > response.write "<param name='"somevalue"'
    > value=""http://www.domainname.com/score.asp?par='"&parArray(i)&"' "">"
    > next
    >
    > The link is generated, but when I click on it, it goes to the page but the
    > query string reads:
    >
    > [url]http://www.domainname.com/score.asp?par='%202[/url]'
    >
    > Could someone take a look, and tell me where I am going wrong here?
    >
    > TIA
    >
    > Steve G
    >
    >

    Tom B Guest

  5. #5

    Default Re: Once again

    shows 1,2

    Steve G

    "McKirahan" <News@McKirahan.com> wrote in message
    news:pZVkb.597352$Oz4.592874@rwcrnsc54...
    > "Steve G" <steve@nospam.tnccreations.com> wrote in message
    > news:e#KV4dzlDHA.1884@TK2MSFTNGP09.phx.gbl...
    > > If you have followed my previous posts, you will know that I am working
    > with
    > > some arrays in a page. Thanks to all who have helped me out so far.
    > >
    > > Now I am creating an array from a database then a string from the array.
    > The
    > > values are being returned correctly.
    > >
    > > arrID = objRs3.GetRows
    > >
    > > for a = 0 to uBound(arrID,2)
    > > for b = 0 to uBound(arrID,1)
    > > strVal = strVal & " " & arrID(b,a)
    > > next
    > > strVal = strVal & ","
    > > next
    > > strVal = Left(strVal, Len(strVal) -1)
    > > parArray = split(StrVal, ",")
    > >
    > > I am trying to create a parameterized link to another page:
    > >
    > > for i = 0 to uBound(parArray)
    > > response.write "<param name='"somevalue"'
    > > value=""http://www.domainname.com/score.asp?par='"&parArray(i)&"' "">"
    > > next
    > >
    > > The link is generated, but when I click on it, it goes to the page but
    the
    > > query string reads:
    > >
    > > [url]http://www.domainname.com/score.asp?par='%202[/url]'
    > >
    > > Could someone take a look, and tell me where I am going wrong here?
    > >
    > > TIA
    > >
    > > Steve G
    >
    > "%20" = a space.
    >
    > My guess is that the "StrVal" contains " 2".
    >
    > What does a Response.Write show before the "split()"?
    >
    >

    Steve G Guest

  6. #6

    Default Re: Once again

    Thanks Ray...you are quite right about '" & somevalue & "' I just shortened
    it to what I wrote, since that particular variable is working all riight,
    and I was concerned about really confusing things by showing the code that
    goes with it.

    Steve G

    "Ray at <%=sLocation%>" <myfirstname at lane34 dot com> wrote in message
    news:OC33UmzlDHA.3312@tk2msftngp13.phx.gbl...
    > What's the value of parArray(i)? Is it 2? If so, there's a space in your
    > url for some reason. Try trimming your values. Also, your code below is
    a
    > bit syntactically incorrect. I don't know if copied and pasted or just
    > rewrote it or what, but it should look more like:
    >
    >
    > for i = 0 to uBound(parArray)
    > response.write "<param name='" & somevalue & "'
    > value=""http://www.domainname.com/score.asp?par='" & parArray(i) & "' "">"
    > next
    >
    > Furthmore, you may want to look into the getString method.
    > [url]http://msdn.microsoft.com/library/en-us/ado270/htm/mdamth02_11.asp[/url]
    >
    > Ray at work
    >
    >
    >
    > "Steve G" <steve@nospam.tnccreations.com> wrote in message
    > news:e%23KV4dzlDHA.1884@TK2MSFTNGP09.phx.gbl...
    > > If you have followed my previous posts, you will know that I am working
    > with
    > > some arrays in a page. Thanks to all who have helped me out so far.
    > >
    > > Now I am creating an array from a database then a string from the array.
    > The
    > > values are being returned correctly.
    > >
    > > arrID = objRs3.GetRows
    > >
    > > for a = 0 to uBound(arrID,2)
    > > for b = 0 to uBound(arrID,1)
    > > strVal = strVal & " " & arrID(b,a)
    > > next
    > > strVal = strVal & ","
    > > next
    > > strVal = Left(strVal, Len(strVal) -1)
    > > parArray = split(StrVal, ",")
    > >
    > > I am trying to create a parameterized link to another page:
    > >
    > > for i = 0 to uBound(parArray)
    > > response.write "<param name='"somevalue"'
    > > value=""http://www.domainname.com/score.asp?par='"&parArray(i)&"' "">"
    > > next
    > >
    > > The link is generated, but when I click on it, it goes to the page but
    the
    > > query string reads:
    > >
    > > [url]http://www.domainname.com/score.asp?par='%202[/url]'
    > >
    > > Could someone take a look, and tell me where I am going wrong here?
    > >
    > > TIA
    > >
    > > Steve G
    > >
    > >
    >
    >

    Steve G Guest

  7. #7

    Default Re: Once again

    I am still pretty much a novice at this stuff, and haven't used the
    getString method before. I'll take a look at it and see if it will help me
    make this work.

    Thanks

    Steve G

    "Tom B" <shuckle@hotmail.com> wrote in message
    news:efD1FozlDHA.2328@TK2MSFTNGP10.phx.gbl...
    > I didn't read the previous thread.
    > Are you taking your recordset and converting it into a string with the
    > fields separated by spaces and the rows by commas?
    >
    > If so, I think you'll find this is faster....
    > strVal=objRS3.GetString(,,","," ")
    >
    > "Steve G" <steve@nospam.tnccreations.com> wrote in message
    > news:e%23KV4dzlDHA.1884@TK2MSFTNGP09.phx.gbl...
    > > If you have followed my previous posts, you will know that I am working
    > with
    > > some arrays in a page. Thanks to all who have helped me out so far.
    > >
    > > Now I am creating an array from a database then a string from the array.
    > The
    > > values are being returned correctly.
    > >
    > > arrID = objRs3.GetRows
    > >
    > > for a = 0 to uBound(arrID,2)
    > > for b = 0 to uBound(arrID,1)
    > > strVal = strVal & " " & arrID(b,a)
    > > next
    > > strVal = strVal & ","
    > > next
    > > strVal = Left(strVal, Len(strVal) -1)
    > > parArray = split(StrVal, ",")
    > >
    > > I am trying to create a parameterized link to another page:
    > >
    > > for i = 0 to uBound(parArray)
    > > response.write "<param name='"somevalue"'
    > > value=""http://www.domainname.com/score.asp?par='"&parArray(i)&"' "">"
    > > next
    > >
    > > The link is generated, but when I click on it, it goes to the page but
    the
    > > query string reads:
    > >
    > > [url]http://www.domainname.com/score.asp?par='%202[/url]'
    > >
    > > Could someone take a look, and tell me where I am going wrong here?
    > >
    > > TIA
    > >
    > > Steve G
    > >
    > >
    >
    >

    Steve G Guest

  8. #8

    Default Re: Once again

    Well...I finally found the pesky space that was causing me all those
    problems.

    Thanks to everyone who helped

    Steve G

    "Steve G" <steve@nospam.tnccreations.com> wrote in message
    news:e%23KV4dzlDHA.1884@TK2MSFTNGP09.phx.gbl...
    > If you have followed my previous posts, you will know that I am working
    with
    > some arrays in a page. Thanks to all who have helped me out so far.
    >
    > Now I am creating an array from a database then a string from the array.
    The
    > values are being returned correctly.
    >
    > arrID = objRs3.GetRows
    >
    > for a = 0 to uBound(arrID,2)
    > for b = 0 to uBound(arrID,1)
    > strVal = strVal & " " & arrID(b,a)
    > next
    > strVal = strVal & ","
    > next
    > strVal = Left(strVal, Len(strVal) -1)
    > parArray = split(StrVal, ",")
    >
    > I am trying to create a parameterized link to another page:
    >
    > for i = 0 to uBound(parArray)
    > response.write "<param name='"somevalue"'
    > value=""http://www.domainname.com/score.asp?par='"&parArray(i)&"' "">"
    > next
    >
    > The link is generated, but when I click on it, it goes to the page but the
    > query string reads:
    >
    > [url]http://www.domainname.com/score.asp?par='%202[/url]'
    >
    > Could someone take a look, and tell me where I am going wrong here?
    >
    > TIA
    >
    > Steve G
    >
    >

    Steve G Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139