f



java.sql.SQLException: java.sql.Time

I get the following error message...
 java.sql.SQLException: Value '00:00:00 can not be represented as
java.sql.Time

>From the following SQL call...
SELECT COUNT(pageurl) AS PageCount, pageurl, MAX(datetime) AS
LastAccess, SUM(VisitLength) as TotalVisitLength, VisitLength,
RecordNum, SUM(CASE WHEN VisitLength IS NULL THEN 1 ELSE 0 END) AS
NullVisits FROM clubvisits WHERE groupid = #clubid# GROUP BY pageurl
ORDER BY #OrderKey#

I am using ColdFusion 7 (not my choice - don't laugh) on MySQL
4.1.12a.

The error refers to the "VisitLength" field which is a "time" data
type in the database. In the MySQL documentation, it says that
00:00:00 is allowable for time (http://dev.mysql.com/doc/refman/4.1/en/
time.html).

So my question is, why is this error coming up if it's an allowable
value?

0
7/26/2007 2:56:54 PM
comp.databases.mysql 6944 articles. 1 followers. laredotornado (869) is leader. Post Follow

3 Replies
1006 Views

Similar Articles

[PageSpeed] 28

On 26 Jul, 15:56, mehatespam1...@yahoo.com wrote:
> I get the following error message...
>  java.sql.SQLException: Value '00:00:00 can not be represented as
> java.sql.Time
>
> >From the following SQL call...
>
> SELECT COUNT(pageurl) AS PageCount, pageurl, MAX(datetime) AS
> LastAccess, SUM(VisitLength) as TotalVisitLength, VisitLength,
> RecordNum, SUM(CASE WHEN VisitLength IS NULL THEN 1 ELSE 0 END) AS
> NullVisits FROM clubvisits WHERE groupid = #clubid# GROUP BY pageurl
> ORDER BY #OrderKey#
>
> I am using ColdFusion 7 (not my choice - don't laugh) on MySQL
> 4.1.12a.
>
> The error refers to the "VisitLength" field which is a "time" data
> type in the database. In the MySQL documentation, it says that
> 00:00:00 is allowable for time (http://dev.mysql.com/doc/refman/4.1/en/
> time.html).
>
> So my question is, why is this error coming up if it's an allowable
> value?

Because it is a java error, not a mysql error!

0
Captain
7/27/2007 8:42:53 AM
On Jul 27, 4:42 am, Captain Paralytic <paul_laut...@yahoo.com> wrote:

> Because it is a java error, not a mysql error!

But I'm not using Java - I'm not even using ColdFusion, really. When I
take out any ColdFusion from the page except for the <cfquery> wrapper
around the SQL, I still get an error, so it's not like it's related to
processing after the SQL call: it's the call itself.

0
mehatespam1085
7/27/2007 6:14:55 PM
mehatespam1085@yahoo.com wrote:
> On Jul 27, 4:42 am, Captain Paralytic <paul_laut...@yahoo.com> wrote:
> 
>> Because it is a java error, not a mysql error!
> 
> But I'm not using Java - I'm not even using ColdFusion, really. When I
> take out any ColdFusion from the page except for the <cfquery> wrapper
> around the SQL, I still get an error, so it's not like it's related to
> processing after the SQL call: it's the call itself.
> 

The fact you're getting a java.sql.SQLException shows you're using Java.

Maybe not directly - but at least indirectly.

-- 
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================
0
Jerry
7/28/2007 1:42:15 AM
Reply: