?
Solved

error '80020009' Exception occurred.

Posted on 2006-06-15
3
Medium Priority
?
582 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 143

Accepted Solution

by:
Guy Hengel [angelIII / a3] earned 200 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

Three Reasons Why Backup is Strategic

Backup is strategic to your business because your data is strategic to your business. Without backup, your business will fail. This white paper explains why it is vital for you to design and immediately execute a backup strategy to protect 100 percent of your data.

Question has a verified solution.

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

Introduction Since I wrote the original article about Handling Date and Time in PHP and MySQL several years ago, it seemed like now was a good time to update it for object-oriented PHP.  This article does that, replacing as much as possible the pr…
In this blog post, we’ll look at how using thread_statistics can cause high memory usage.
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…

762 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