[thelist] ASP/SQL Question Almost Got It!

J. Blanchard jay.blanchard at thermon.com
Fri Sep 14 15:24:08 CDT 2001


Using this script ;

<%
DIM pd
pd = ""

While Not product.EOF
	If pd <> (product.Fields.Item("ProductDesc").Value) Then
	pd = (product.Fields.Item("ProductDesc").Value)
	response.write (pd & "<br>")
		While pd = (product.Fields.Item("ProductDesc").Value)
			response.write ((product.Fields.Item("ProductID").Value) & "<br>")
			product.MoveNext
		Wend
	End If
	product.MoveNext
Wend
%>	

I get this from one recordset;

Mineral Insulated Cable (productdesc)
MIQ (productid)
Power Limiting Heating Cable
HPT 
D1-HPT 
Self-Regulating Heating Cable
RSX
RSX 15-2
D1-RSX 
TSX
D1-TSX 
VSX
D1-VSX
Series Constant Watt Heating Cable
TEK 

There are only a couple of bumps;
Not all of the productdesc's show up (you can comment out the do while loop and they all show up), and have a similar existence...they are productdesc's that have only one product in them and they ARE NOT the first productdesc/productid. The first one, whil sharing a the same characteristics, writes out fine.

On productdesc's with multiple productid's after the first productdesc/productid combination the first productid for a productdesc is not printed out.

I know I missed something in the code, but I have looked at it for too long and can't see it. Can anyone help?

Thanks!

Jay Blanchard
Web Development Manager
Thermon Manufacturing Company
1.800.820.HEAT x327
___________________________________________________________________________
Visit http://www.visto.com.
Find out  how companies are linking mobile users to the 
enterprise with Visto.





More information about the thelist mailing list