数据库是一样的。 SQl语句是: SqlString = "select tabMeasure.*, tabKid.KidName,tabKid.Gender, tabClass.ClassName,tabTeacher.teachername from tabKid,tabMeasure,tabClass,tabTeacher where tabClass.Gartenid = tabKid.Gartenid and tabKid.kidid = tabMeasure.kidid and tabMeasure.KidID = '"& KidID &"' and tabTeacher.PublishID = '"& PublishID &"' order by tabMeasure.age, tabMeasure.month"
SQl语句是:
SqlString = "select tabMeasure.*, tabKid.KidName,tabKid.Gender, tabClass.ClassName,tabTeacher.teachername from tabKid,tabMeasure,tabClass,tabTeacher where tabClass.Gartenid = tabKid.Gartenid and tabKid.kidid = tabMeasure.kidid and tabMeasure.KidID = '"& KidID &"' and tabTeacher.PublishID = '"& PublishID &"' order by tabMeasure.age, tabMeasure.month"
response.write SqlString
再主页中将显示的SQL语句粘贴到查询分析器中,看看结果如何。
PrevMonth = Rs("Month")
PrevHeight = Rs("Height")
while not Rs.Eof
PrevAge = Rs("Age")
PrevMonth = Rs("Month")
PrevHeight = Rs("Height")
wend
PrevMonth = Rs("Month")
PrevHeight = Rs("Height")
rs.movenext
while not Rs.Eof
PrevAge = Rs("Age")
PrevMonth = Rs("Month")
PrevHeight = Rs("Height")
rs.movenext
wend 试一试
ASP有时会有非理性的错误
不推荐用while...wend,因为不能跳出循环。
用Do while ..loop,Do until...loop 较好