473,404 Members | 2,195 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,404 software developers and data experts.

alternate SQL in asp page

Hi i am wondering if anyone can help
I am testing a site i am building (still in building stages!)
The problem is with my products, that on some pages, there are too many
products, and i want to have a futher of of a page for such products

take a look for example

http://www.tripak.me.uk/index.asp

if you leaf through any product, on the final page (listing.asp) the product
is available to you in 5-10 variants, but say if you click on something like
cartons and corrugated rolls, and follow thru cartons and single wall
cartons, i have too many results, and this will bore the user.

Can anyone help me? i will explain how my DB is structured and what i think
can be done, i just dont know how to do it.

thanks

Raphael
Jul 19 '05 #1
10 1760
You could try recordset paging to scroll through pages of
results instead

http://www.aspfaq.com/show.asp?id=2120
-----Original Message-----
Hi i am wondering if anyone can help
I am testing a site i am building (still in building stages!)The problem is with my products, that on some pages, there are too manyproducts, and i want to have a futher of of a page for such products
take a look for example

http://www.tripak.me.uk/index.asp

if you leaf through any product, on the final page (listing.asp) the productis available to you in 5-10 variants, but say if you click on something likecartons and corrugated rolls, and follow thru cartons and single wallcartons, i have too many results, and this will bore the user.
Can anyone help me? i will explain how my DB is structured and what i thinkcan be done, i just dont know how to do it.

thanks

Raphael
.

Jul 19 '05 #2
I personally like being able to see all the options on one page, but you may
want to break them up to look a little more friendly, like:


Length up to 200mm
1049 127mm x 127mm x 127mm
1050 152mm x 127mm x 102mm
1051 152mm x 152mm x 152mm
1052 178mm x 178mm x 178mm
1053 190mm x 152mm x 89mm
etc.

Length from 200mm to 300mm
1081 250mm x 200mm x 200mm
1082 250mm x 250mm x 100mm
1083 254mm x 254mm x 254mm
etc.

Length from 300mm to 400mm
1126 300mm x 200mm x 170mm
1127 300mm x 250mm x 200mm
1128 300mm x 300mm x 300mm
1129 305mm x 229mm x 152mm
1130 305mm x 229mm x 229mm
etc.

Ray at work

"Raphael Gluck" <ra**********@bezeqint.net> wrote in message
news:ux*************@TK2MSFTNGP12.phx.gbl...
Hi i am wondering if anyone can help
I am testing a site i am building (still in building stages!)
The problem is with my products, that on some pages, there are too many
products, and i want to have a futher of of a page for such products

take a look for example

http://www.tripak.me.uk/index.asp

if you leaf through any product, on the final page (listing.asp) the product is available to you in 5-10 variants, but say if you click on something like cartons and corrugated rolls, and follow thru cartons and single wall
cartons, i have too many results, and this will bore the user.

Can anyone help me? i will explain how my DB is structured and what i think can be done, i just dont know how to do it.

thanks

Raphael

Jul 19 '05 #3
p.s. I am moving next week. Would you please send me 5000 1539's please.
Thanks. :P

Ray at work

"Raphael Gluck" <ra**********@bezeqint.net> wrote in message
news:ux*************@TK2MSFTNGP12.phx.gbl...

take a look for example

http://www.tripak.me.uk/index.asp

Jul 19 '05 #4
Hey Ray thanks for that

It seems that you more than understood my problem
Indeed i have a furhter table, taht i am trying to incoroporate onto my
page, this would be an alternate SQL so when you have something like
cartons, you are presented with options just the way you put it, "length
upto 200mm" etc..

Do you know how to incorporate that SQL if i showed you the code? and how to
alternate with an IF clause? i am using a wsyiwyg editor. I know!! I am
still learning

Thanks

Raphael
Jul 19 '05 #5
Post the _relevant_ code _snippet_ and we'll see if we can make any sense
out of it.

Ray at work

"Raphael Gluck" <iwish i could tell you @alas blame the spammers> wrote in
message news:OC**************@TK2MSFTNGP12.phx.gbl...
Hey Ray thanks for that

It seems that you more than understood my problem
Indeed i have a furhter table, taht i am trying to incoroporate onto my
page, this would be an alternate SQL so when you have something like
cartons, you are presented with options just the way you put it, "length
upto 200mm" etc..

Do you know how to incorporate that SQL if i showed you the code? and how to alternate with an IF clause? i am using a wsyiwyg editor. I know!! I am
still learning

Thanks

Raphael

Jul 19 '05 #6


I did it in dreamweaver, so you're gonna go crazy with all the trash it puts
in

http://www.tripakltd.com/aspbeta/listing1.txt
Jul 19 '05 #7
I've modified a bit of the code here. My modifications are in CAPITAL
letters so you can see the difference. I didn't test or proofread! This
starts where you .txt link that you posted starts at line 181.

Ray at work

<%
SOLD_TEXT_SPEC = ""

While ((Repeat1__numRows <> 0) AND (NOT rsListing.EOF))
STEXT_SPEC = RSLISTING.FIELDS.ITEM("Text_Spec").VALUE
IF STEXT_SPEC <> SOLD_TEXT_SPEC THEN
%>

<TR>
<TD COLSPAN="3" ALIGN="CENTER"><B><%=STEXT_SPEC%></B></TD>
</TR>
<% END IF %>
<table width="60%" border="0" align="center">
<%If (Repeat1__numRows Mod 2) Then%>
<tr style="background-color:#FFF960">
<%Else%>
<tr class="listing" style="background-color:#FFF990">
<%End If%>
<td width="33%" nowrap><div align="left"><font
size="1"><%=(rsListing.Fields.Item("Inventory_ID") .Value)%></font></div>
</td>
<% if isnull(rsListing("DescrMetric")) then %>
<td width="33%" nowrap><font
size="1"><%=(rsListing.Fields.Item("Product_Name") .Value)%></font></td>
<%End If%>
<% if not isnull(rsListing("Text_Spec")) then %>
<td width="33%" nowrap><font size="1">LEAVE BLANK OR DELETE THIS TD
ALTOGETHER</font></td>
<% end if %>
<td width="33%" nowrap><div align="center"><font
size="1"><%=(rsListing.Fields.Item("DescrMetric"). Value)%></font></div>
</td>
<% if not isnull(rsListing("Color")) then %>
<td width="0%" nowrap>
<div align="center"><font size="1">
<%=(rsListing.Fields.Item("Color").Value)%> </font></div>
</td>
<% end if %>
<% if not isnull (rsListing("Grades")) then %>
<td width="0%" nowrap><font
size="1"><%=(rsListing.Fields.Item("Grades").Value )%></font></td>
<% end if %>
<% if not isnull (rsListing("Specific_image")) then %>
<td width="0%" nowrap><font
size="1"><%=(rsListing.Fields.Item("Specific_image ").Value)%></font></td>
<% end if %>
</tr>
</table>
<%
Repeat1__index=Repeat1__index+1
Repeat1__numRows=Repeat1__numRows-1
rsListing.MoveNext()

SOLD_TEXT_SPEC = STEXT_SPEC
Wend
%>
Jul 19 '05 #8
Put links to the headers (300 to 400) like:

<A href="thissamepage.asp?size=300-400">Click here to see 300 to 400 mm
cartons.</A>
Then modify your SQL so it's like:

Select Case Request.Querystring("size")
Case "300-400"
sSQL = sSQL & " WHERE TheColumnThatHoldsBoxSizeRange='300 to 400
mm'"
Case 600-800
sSQL = sSQL & " WHERE TheColumnThatHoldsBoxSizeRange='600 to 800
mm'"
End Select

Are you familiar with WHERE clauses?

Ray at home
--
Will trade ASP help for SQL Server help
"Raphael Gluck" <iwish i could tell you @alas blame the spammers> wrote in
message news:uc**************@TK2MSFTNGP12.phx.gbl...
Hi there, sorry it has taken me so long to respond; By the time you replied Friday, i had left.

It seems that you understood my problem really well, I'm too ignorant to
know how i need to do these things in ASP. But at least I have purchased a
full tutorial for asp.net and hopefully one day, not to far away i can ditch the WSYWYG generators.
I tried copying and pasting your code. And as I said, you seemed to have
grasped the nature of my problem, Still I wanted to ask a couple of things, whether you can help me modify it a little more.
Yes, you have succesfully helped with adding the text spec, i.e the "200 to 300 mm" etc..
But would it be possible, in a case of a text spec value being present, to
only display the text spec fields? in other words
200 to 300mm
300 to 400 mm
400 to 500mm
etc..

And then allow the user to click one of those, and depending on that, he
sees all the results relevant to between those figures?

Thanks for helping me, so far, i greatly appreciate it

Raphael

Jul 19 '05 #9
Well i am a little familiar with WHERE clauses, but i dont think what you
suggested is an option for me here.
I was quoting cartons as an example of a product that needs that extra bit
of a recordset. but there are other examples too.
Most of my products dont need that option, but a sizeable amount do, though.
I think what you were suggesting was to create manual links, that are unique
to every product. I guess that's against the laws of dynamic content. If you
wish I could send you my DB so you could get a better idea. I can compact it
to around 130k.

thanks for your help thus far

Enjoy the rest of your day

Raphael
Jul 19 '05 #10
Sorry sir,
I wasnt suggesting sending you my database, so that you should modify it for
me, I just merely thought it would give you a better understanding of what i
was trying to achieve.
I'm sorry for the misunderstanding
Jul 19 '05 #11

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: aznFETISH | last post by:
I have a list of links that I ue on my page, I alternate background colors for these links in a table, I usually do it using a DB but this list of link is manually added into the page so my...
4
by: Drifter | last post by:
Using HTTP_REFERER I cannot capture the URL when the link is made via a button: <input type="button" name="Continue" value="Continue Shopping"...
13
by: Toby A Inkster | last post by:
www.authoring.stylesheets] For ages I have provided links to alternate stylesheets from my pages as per W3C recommendations: <link rel="stylesheet" href="baz" type="text/css" title="Baz"...
21
by: Steel | last post by:
Hi at all, I have a very long html page with many photo. Therefore the best to print this page is to print the some page as PDF. Therefore I maked a PDF file like my page to print best. I'ld want...
10
by: Jarson | last post by:
I am using the ACRONYM tag to provide an explanation of codes within my application. Example: <p>The circuit <acronym title="Circuit P123T: Picton SS to Telebary SS 345KV">P123T</acronym> is...
1
by: Eric Lindsay | last post by:
I am trying to understand the differences between and uses of persistent, default and alternate styles. I have read http://www.w3.org/TR/REC-html40/present/styles.html section 14.3.2 on...
4
by: =?Utf-8?B?V2ViQnVpbGRlcjQ1MQ==?= | last post by:
I need to post a form to an alternate technology. I have created pop up windows that on post back will open a new window, but this uses get. I need to encode variables and POST to a new window on...
9
by: johkar | last post by:
I need some browser implementation clarification. In the below example, the alternate stylesheet could be invoked by user agents that support alternate stylesheets or by script. Are there any...
18
by: JohnDriver | last post by:
Hi, I am happy to say that with your help, I have been performing good in Ajax. Thanks for helping me to start with. I have a small problem now. I am pulling records from database and passing...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.