• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 588
  • Last Modified:

error '80020009' Exception occurred.

Here is the page in question:

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">
      <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>
      <%while not rec1.eof%>


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:

as it shows above.

The datatype in the database is TIME

What seems to be the problem?

  • 2
1 Solution
Guy Hengel [angelIII / a3]Billing EngineerCommented:
ado is unable to manage the TIME data type. hence, you have to convert it inside the query to string data for example

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")
jeffreytpAuthor Commented:
It worked.  Thank you!
Guy Hengel [angelIII / a3]Billing EngineerCommented:
Glad I could help.
you should hence close the question.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now