Live Chat & Podcast at 1:00PM Eastern on Sunday!
There's no such thing as a stupid question, but they're the easiest to answer.
JoinTour
Login
Search
Tag Cloud
access acer asus bios bsod computer crash desktop drive driver drivers error ethernet excel freeze gaming hard drive hardware hdmi internet laptop malware memory missing monitor motherboard network printer problem ram random registry router slow software sound trojan ubuntu 11.10 uninstall usb video virus vista wifi windows windows 7 windows 7 32 bit windows 7 64 bit windows xp wireless
Search
Search for:
Tech Support Guy Forums > Internet & Networking > Web Design & Development >
Problems With Multple Recordsets

Reply  
Thread Tools
KugarWeb's Avatar
Computer Specs
Member with 138 posts.
 
Join Date: Apr 2007
Experience: Intermediate
16-Nov-2009, 08:23 PM #1
Problems With Multple Recordsets
Hey there,

I'm currently working on a site which involves collection from two tables in an Access database on one page which I've never done before. However, I thought I'd got it working before a "error 800a0cc1" stopped me in my tracks.

I've checked the database to make sure all the field names are there and are named and spelled correctly according to the ASP code, and also the correct formats have been applied to the fields themselves. But, now I'm stuck. Below is the ASP code which I've pulled out of the page.

Code:
<%
var rsTestimonial = Server.CreateObject("ADODB.Recordset");
rsTestimonial.ActiveConnection =  "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + Server.MapPath("update/psychobeing.mdb")
rsTestimonial.Source = "SELECT TOP 1 testimonial, clientName FROM tbTestimonial ORDER BY Rnd(-10000000*TimeValue(Now())*[testimonialID])";
rsTestimonial.CursorType = 1;
rsTestimonial.CursorLocation = 2;
rsTestimonial.LockType = 1;
rsTestimonial.Open();

%>
<%
var rsDiary = Server.CreateObject("ADODB.Recordset");
rsDiary.ActiveConnection =  "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + Server.MapPath("update/psychobeing.mdb")
rsDiary.Source = "SELECT TOP 3 diaryID FROM tbDiary ORDER BY diaryID desc";
rsDiary.CursorType = 1;
rsDiary.CursorLocation = 2;
rsDiary.LockType = 1;
rsDiary.Open();

%>

<div id="diary"><%if (rsDiary.RecordCount == 0){%>
      </p>
      <p align="center">There are currently no diary entries. Please check back soon. </p>
      <%}else{%>
      <%while(!rsDiary.EOF){%>
<%=rsDiary("diaryDate")%>&nbsp;-&nbsp;<%=rsDiary("diaryTitle")%><br />
<%=rsDiary("diaryPost")%><br />
<a href="diary.asp" target="_parent">[read more]</a><br /><%rsDiary.MoveNext()}%>
      <%}%></div>



<div id="testimonials"><%if (rsTestimonial.RecordCount == 0){%>
      </p>
      <p align="center">There are currently no Testimonials. Please check back soon. </p>
      <%}else{%>
      <%while(!rsTestimonial.EOF){%>
<%=rsTestimonial("testimonial")%><br />
<strong><%=rsTestimonial("clientName")%></strong><br /><br />
<a href="testimonials.asp" target="_parent">[read more]</a><br /><%rsTestimonial.MoveNext()}%>
      <%}%></div>
Reply

THIS THREAD HAS EXPIRED.
Are you having the same problem? We have volunteers ready to answer your question, but first you'll have to join for free. Need help getting started? Check out our Welcome Guide.

Search Tech Support Guy

Find the solution to your
computer problem!




Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
WELCOME TO TECH SUPPORT GUY! Are you looking for the solution to your computer problem? Join our site today to ask your question -- for free! Our site is run completely by volunteers who want to help you solve your computer problems. See our Welcome Guide to get started.
Thread Tools



Facebook Facebook Twitter Twitter TechGuy.tv TechGuy.tv Mobile TSG Mobile
You Are Using:
Server ID
Advertisements do not imply our endorsement of that product or service.
All times are GMT -4. The time now is 03:16 AM.
Copyright © 1996 - 2011 TechGuy, Inc. All rights reserved.

Powered by Cermak Technologies, Inc.