Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Rotating ad banner script errors

Status
Not open for further replies.

hallm

Programmer
Joined
Jun 11, 2000
Messages
159
Location
US
I've found an example ad rotation script that will do work for what I'm trying to do with my online newspaper.&nbsp;&nbsp;I get the same error every time I try to run it.&nbsp;&nbsp;What am I doing wrong?<br><br>Error:&nbsp;&nbsp;Microsoft OLE DB Provider for ODBC Drivers error '80040e24' <br>The rowset does not support fetching backwards <br>/news/start2.asp, line 154<br><br>&lt;%<br>set rotatingad = db.execute(&quot;SELECT * FROM ads2&quot;)<br><br>Dim rndMax, rndNumber<br>Dim BID, imagefile, url<br>Randomize<br>rndMax = Int(rotatingad.RecordCount)<br>rndNumber = Int(RND * rndMax)<br><br>rotatingad.Move rndNumber<br>BID = rotatingad(&quot;BID&quot;)<br>imagefile = rotatingad(&quot;imagefile&quot;)<br>url = rotatingad(&quot;url&quot;)<br>%&gt;<br><br>&lt;a href = &quot;adsredirect.asp?ID=&lt;%=BID%&gt;&quot; TARGET=&quot;_blank&quot;&gt;&lt;IMG height=&quot;71&quot; width=&quot;155&quot; SRC=&quot;<A HREF=" TARGET="_new"> BORDER = 0&gt;&lt;/a&gt;<br>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top