Ask a Question related to ASP Database, Design and Development.
-
Steve G #1
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
-
McKirahan #2
Re: Once again
"Steve G" <steve@nospam.tnccreations.com> wrote in message
news:e#KV4dzlDHA.1884@TK2MSFTNGP09.phx.gbl...with> If you have followed my previous posts, you will know that I am workingThe> 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."%20" = a space.> 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
My guess is that the "StrVal" contains " 2".
What does a Response.Write show before the "split()"?
McKirahan Guest
-
Ray at #3
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...with> If you have followed my previous posts, you will know that I am workingThe> 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.> 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
-
Tom B #4
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...with> If you have followed my previous posts, you will know that I am workingThe> 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.> 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
-
Steve G #5
Re: Once again
shows 1,2
Steve G
"McKirahan" <News@McKirahan.com> wrote in message
news:pZVkb.597352$Oz4.592874@rwcrnsc54...the> "Steve G" <steve@nospam.tnccreations.com> wrote in message
> news:e#KV4dzlDHA.1884@TK2MSFTNGP09.phx.gbl...> with> > If you have followed my previous posts, you will know that I am working> The> > 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.> > 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>> > 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
-
Steve G #6
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...a> 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 isthe> 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...> with> > If you have followed my previous posts, you will know that I am working> The> > 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.> > 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>> > 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
-
Steve G #7
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...the> 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...> with> > If you have followed my previous posts, you will know that I am working> The> > 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.> > 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>> > 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
-
Steve G #8
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...with> If you have followed my previous posts, you will know that I am workingThe> 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.> 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



Reply With Quote

