ASP Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Iron Speed
Go Back   ASP Free ForumsProgrammingASP Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread ASP Free Forums Sponsor:
Ajax Application Generator Generate database and reporting .NET Web apps in minutes. Quickly create visually stunning, feature-rich apps that are easy to customize and ready to deploy. Download Now!
  #1  
Old April 14th, 2008, 08:42 PM
ajboyce08 ajboyce08 is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Apr 2008
Posts: 1 ajboyce08 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 21 m 39 sec
Reputation Power: 0
Hopefully a simple fix ;P

The address to that page with the problem is http://www.helpyourgrades.com/search.asp , basically when there is an odd number of items being displayed it gives an error next to the last entry. below is part of the code, It seems like all it would need is a End If by the first rs.movenext, but I have been unable to get it to work. The code is in asp.

Thanks in advance, AJ.

______________

Code:
table align="center" class="sample" width="75%" border="0" cellspacing="1" cellpadding="1">
	<tr>
		<td align="center" width="50%"><font size="4" color="white"><font size="4" color="white"><a href = "product.asp?id=<%=rs("id")%>"> <%=rs("name")%></a><br><br><img align="center" src="pics/<%=rs("image")%>.jpg"></td>
		<% rs.movenext %>
		<td align="center" width="50%"><font size="4" color="white"><font size="4" color="white"><a href = "product.asp?id=<%=rs("id")%>"> <%=rs("name")%></a><br><br><img align="center" src="pics/<%=rs("image")%>.jpg"></td>
	</tr>
	</table>	                             
<br><br><br>
<%		rs.movenext
		Loop

		End if
%>

Reply With Quote
  #2  
Old April 15th, 2008, 08:08 AM
mehere's Avatar
mehere mehere is offline
Senior Sarcasm Wizardess
Click here for more information.
 
Join Date: Feb 2005
Location: Dreamland
Posts: 12,483 mehere User rank is General 7th Grade (Above 100000 Reputation Level)mehere User rank is General 7th Grade (Above 100000 Reputation Level)mehere User rank is General 7th Grade (Above 100000 Reputation Level)mehere User rank is General 7th Grade (Above 100000 Reputation Level)mehere User rank is General 7th Grade (Above 100000 Reputation Level)mehere User rank is General 7th Grade (Above 100000 Reputation Level)mehere User rank is General 7th Grade (Above 100000 Reputation Level)mehere User rank is General 7th Grade (Above 100000 Reputation Level)mehere User rank is General 7th Grade (Above 100000 Reputation Level)mehere User rank is General 7th Grade (Above 100000 Reputation Level)mehere User rank is General 7th Grade (Above 100000 Reputation Level)mehere User rank is General 7th Grade (Above 100000 Reputation Level)mehere User rank is General 7th Grade (Above 100000 Reputation Level)mehere User rank is General 7th Grade (Above 100000 Reputation Level)mehere User rank is General 7th Grade (Above 100000 Reputation Level)mehere User rank is General 7th Grade (Above 100000 Reputation Level)  Folding Points: 10976 Folding Title: Novice Folder
Time spent in forums: 4 Months 3 Weeks 3 Days 21 h 7 m 11 sec
Reputation Power: 1450
why do you have two rs.movenext in your code? that is an issue. what are you trying to accomplish by doing that?
__________________
Come JOIN the party!!!

Quote of the Month:
Trouble: Luck can't last a lifetime unless you die young.

Questions to Ponder:
Do cemetery workers prefer the graveyard shift?

iif([sarcasm]=true,iif([you have to ask]=true,"didn't work","ha ha ha"),"not sarcasm")
copyright© 2008 sbenj69

Reply With Quote
  #3  
Old April 15th, 2008, 08:13 AM
Wolffy's Avatar
Wolffy Wolffy is offline
Slaprentice of Wolves
Click here for more information.
 
Join Date: Aug 2007
Location: Mossville, IL
Posts: 1,015 Wolffy User rank is Major (30000 - 40000 Reputation Level)Wolffy User rank is Major (30000 - 40000 Reputation Level)Wolffy User rank is Major (30000 - 40000 Reputation Level)Wolffy User rank is Major (30000 - 40000 Reputation Level)Wolffy User rank is Major (30000 - 40000 Reputation Level)Wolffy User rank is Major (30000 - 40000 Reputation Level)Wolffy User rank is Major (30000 - 40000 Reputation Level)Wolffy User rank is Major (30000 - 40000 Reputation Level)Wolffy User rank is Major (30000 - 40000 Reputation Level)Wolffy User rank is Major (30000 - 40000 Reputation Level) 
Time spent in forums: 1 Week 4 Days 2 h 3 m 50 sec
Reputation Power: 329
I don't see the beginning of your IF statement in the example. However, the code needs to check for EOF after the rs.movenext prior to the second td tag.
__________________
Wolffy
------------------------
Teaching people to fish.

Reply With Quote
  #4  
Old April 15th, 2008, 09:47 AM
BLarche BLarche is offline
Contributing User
Click here for more information.
 
Join Date: Jan 2007
Location: Indianapolis, USA
Posts: 3,039 BLarche User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)BLarche User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)BLarche User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)BLarche User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)BLarche User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)BLarche User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)BLarche User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)BLarche User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)BLarche User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)BLarche User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)BLarche User rank is Lieutenant Colonel (40000 - 50000 Reputation Level) 
Time spent in forums: 1 Month 3 Days 20 h 31 m 48 sec
Reputation Power: 469
I would suggest looking into using the Mod function built into VBScript.

Also, you do not need two rs.MoveNext lines. This is the reason it is causing your error. Why? Because the first rs.MoveNext is moving to the END of the recordset so when the second rs.MoveNext is executed, it is already at the END of the recorset, therefore causing the EOF or BOF error (End of File / Beginning of File).
__________________
"You'll never be as perfect as BLaaaaaaaaarche."

Reply With Quote
Reply

Viewing: ASP Free ForumsProgrammingASP Development > Hopefully a simple fix ;P


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

 Free IT White Papers!
 
Accelerating Trading Partner Performance
One in five. That's how many partner transactions have at least one error. That is an amazing statistic, particularly given the extraordinary leaps in innovation across the global supply chain during the past two decades. Download this white paper to learn more.

 
Competing on Analytics
This Tech Analysis is designed to help identify characteristics shared by analytics competitors, and includes information about 32 organizations that have made a commitment to quantitative, fact-based analysis.

 
Cost Effective Scaling with Virtualization and Coyote Point Systems
An overview of the industry trend toward virtualization, how server consolidation has increased the importance of application uptime and the steps being taken to integrate load balancing technology with virtualized servers.

 
Five Checkpoints to Implementing IP Telephony
Implementation planning for IP PBX software and IP telephony has become vital as businesses replace discontinued legacy PBX phone systems. This informative whitepaper outlines five "checkpoints" for any implementation plan that will help make IP communications a successful proposition.

 
Hosted Email Security: Staying Ahead of New Threats
In the last two years, email has become a fierce battleground between the nefarious forces of spam and malware, and the heroes of messaging protection. The spam volumes increased alarmingly every month, bringing clever new forms of phishing and virus propagation attacks.

 

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway