Solved

error '80020009' Exception occurred.

Posted on 2006-06-15
3
570 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 142

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 142

Expert Comment

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

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
how do you get these � Marks in your text? 9 75
How do i connect MySQL on Visual Studio 3 57
understanding output of mysql version 2 51
Mysql Crashing Intermittently 16 83
More Fun with XML and MySQL – Parsing Delimited String with a Single SQL Statement Are you ready for another of my SQL tidbits?  Hopefully so, as in this adventure, I will be covering a topic that comes up a lot which is parsing a comma (or other…
Introduction Since I wrote the original article about Handling Date and Time in PHP and MySQL (http://www.experts-exchange.com/articles/201/Handling-Date-and-Time-in-PHP-and-MySQL.html) several years ago, it seemed like now was a good time to updat…
Windows 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…
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…

867 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now