Wrox Programmer Forums
|
Classic ASP Databases Discuss using ASP 3 to work with data in databases, including ASP Database Setup issues from the old P2P forum on this specific subtopic. See also the book forum Beginning ASP.NET Databases for questions specific to that book. NOT for ASP.NET 1.0, 1.1, or 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Databases section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old November 16th, 2004, 09:23 PM
Registered User
 
Join Date: Nov 2004
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default Exception Occured (0x80020009) problem

Guys,
   When I tried to use the data in my database to build a dvd list table, this problem. I had no problem when I did with catalog ID 1 and catalog ID 2, but I don't know the reason when I try to do with catalog ID 3, this problem happens.....Could someone help me....Thanks.

<%

'Build Recordset
set oRS = Server.CreateObject("ADODB.Recordset")
SQL = "SELECT * FROM dvd WHERE catalogID=3;"
oRS.Open SQL, conn

intCounter = 1
      Do While oRS("catalogID")=3 And NOT oRS.EOF
      %>
      <tr>
      <td align="center"><%=oRS("dvd_id")%></td>
      <td><a href="Moviedetail.asp?intdvd_id=<%=oRS("dvd_id")%> "> <%=oRS("dvd_title")%></a></td>
      <td align="right"><%=oRS("price")%></td></td></tr>

      <%
      oRS.MoveNext
      intCounter = intCounter + 1
      Loop
      %>

 
Old November 17th, 2004, 01:13 AM
Friend of Wrox
 
Join Date: May 2004
Posts: 642
Thanks: 0
Thanked 43 Times in 42 Posts
Default

Instead this can be:

<%

'Build Recordset
set oRS = Server.CreateObject("ADODB.Recordset")
SQL = "SELECT * FROM dvd WHERE catalogID=3;"
oRS.Open SQL, conn

intCounter = 1
      Do While NOT oRS.EOF
      %>
      <tr>
      <td align="center"><%=oRS("dvd_id")%></td>
      <td><a href="Moviedetail.asp?intdvd_id=<%=oRS("dvd_id")%> "> <%=oRS("dvd_title")%></a></td>
      <td align="right"><%=oRS("price")%></td></td></tr>

      <%
      oRS.MoveNext
      intCounter = intCounter + 1
      Loop
      %>

Because already there is condition above in the SQL query.


Om Prakash





Similar Threads
Thread Thread Starter Forum Replies Last Post
Type mimatch & Exception Occured Error Sameer Kulkarni Classic ASP Professional 4 March 9th, 2006 05:41 AM
Exception occured. Cinderella Classic ASP Basics 4 February 9th, 2005 12:49 PM
sole the error 0x80020009 Prabhakar_dt Classic ASP Basics 3 September 10th, 2004 10:26 AM
valign problem occured after inserting a <div> yu100 HTML Code Clinic 0 September 9th, 2003 11:43 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.