Solved

error '80020009' Exception occurred.

Posted on 2006-06-15
3
574 Views
Last Modified: 2013-12-03
Here is the page in question:
http://www.jdvcapital.com/data/mlstracking2.asp

Here is the code in question:

<%
set con = Server.CreateObject("ADODB.Connection")
DSNtest="DRIVER={MySQL ODBC 3.51 Driver};SERVER=mysql10.ixwebhosting.com;UID=jdvcapi_fs1;PWD=venture;DATABASE=jdvcapi_fs1"
con.open DSNtest

set rec1=con.execute ("SELECT * FROM mlstrack where property = '13 Cliffton' ORDER BY ID ASC")
set rec1count=con.execute ("SELECT count(*) as countrec1 FROM mlstrack where property = '13 Cliffton'")
%>


<table border="1" cellspacing="0" bordercolor="#E5E5E5" cellpadding="3" style="border-collapse: collapse" width="600">
    <tr>
      <td align="center"><b><font size="2" face="Arial">View Date</font></b></td>
      <td align="center"><b><font face="Arial" size="2">View Time</font></b></td>
      <td align="center"><font face="Arial" size="2"><b>IP Address</b></font></td>
      <td align="center"><b><font face="Arial" size="2">Referrer</font></b></td>
      <td align="center"><b><font face="Arial" size="2">Browser</font></b></td>
      <td align="center"><b><font size="2" face="Arial">Language</font></b></td>
    </tr>
    <tr>
      <%while not rec1.eof%>
       <td><%=rec1("viewdate")%>&nbsp;</td>
      <td><%=timevalue(rec1("viewtime"))%>&nbsp;

      </td>
      <td><%=rec1("IPAddress")%>&nbsp;</td>
      <td><%=rec1("referer")%>&nbsp;</td>
      <td><%=rec1("useragent")%>&nbsp;</td>
      <td><%=rec1("language")%>&nbsp;</td>
 
    </tr>
    <%rec1.movenext%>
<%wend%>
<%rec1.close%>
</table>


As you can see it runs and then stops and generates thie error:

error '80020009'
Exception occurred.

/data/mlstracking2.asp, line 141

Line 141 is:
<td><%=timevalue(rec1("viewtime"))%>&nbsp;

as it shows above.

The datatype in the database is TIME

What seems to be the problem?

0
Comment
Question by:jeffreytp
  • 2
3 Comments
 
LVL 143

Accepted Solution

by:
Guy Hengel [angelIII / a3] earned 50 total points
ID: 16974398
ado is unable to manage the TIME data type. hence, you have to convert it inside the query to string data for example

http://dev.mysql.com/doc/refman/5.0/en/date-and-time-functions.html
for example:
set rec1=con.execute ("SELECT IPAddress, referer, useragent, language, DATE_FORMAT(viewtime, '%Y-%M-%d' ) as viewtime FROM mlstrack where property = '13 Cliffton' ORDER BY ID ASC")
0
 

Author Comment

by:jeffreytp
ID: 16987297
It worked.  Thank you!
0
 
LVL 143

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 16987663
Glad I could help.
you should hence close the question.
Regards
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Foreword In the years since this article was written, numerous hacking attacks have targeted password-protected web sites.  The storage of client passwords has become a subject of much discussion, some of it useful and some of it misguided.  Of cou…
Introduction In this article, I will by showing a nice little trick for MySQL similar to that of my previous EE Article for SQLite (http://www.sqlite.org/), A SQLite Tidbit: Quick Numbers Table Generation (http://www.experts-exchange.com/A_3570.htm…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…

685 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question