[SqueakDBX] Can't parse date

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
12 messages Options
Reply | Threaded
Open this post in threaded view
|

[SqueakDBX] Can't parse date

Hilaire Fernandes-4
Hello,

I have noted this problem, see attached log

--
http://blog.ofset.org/hilaire

_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project

SqueakDebug.log (4K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: [SqueakDBX] Can't parse date

Mariano Martinez Peck
Hi!

Do you know the database type of the column with value '2006-01-26 17:15:52' ?

cheers,

Mariano

2009/5/7 Hilaire Fernandes <[hidden email]>
Hello,

I have noted this problem, see attached log

--
http://blog.ofset.org/hilaire

_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project


_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: [SqueakDBX] Can't parse date

Mariano Martinez Peck
For MySQL you should use DATETIME instead of TIMESTAMP for those fields.

See http://www.linuxnetworks.de/doc/index.php/OpenDBX/DBMS_Datatypes

Perhaps this is not clear enough and we should add some related info to our wiki.

I hope this helps.

Greetings,

Mariano

On Thu, May 7, 2009 at 11:34 AM, Mariano Martinez Peck <[hidden email]> wrote:
Hi!

Do you know the database type of the column with value '2006-01-26 17:15:52' ?

cheers,

Mariano

2009/5/7 Hilaire Fernandes <[hidden email]>
Hello,

I have noted this problem, see attached log

--
http://blog.ofset.org/hilaire

_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project



_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: [SqueakDBX] Can't parse date

Hilaire Fernandes-4
I am fetching data so I cannot change that.
Any way it is a  non bloquant problem.

Thanks

hilaire


2009/5/7 Mariano Martinez Peck <[hidden email]>
For MySQL you should use DATETIME instead of TIMESTAMP for those fields.

See http://www.linuxnetworks.de/doc/index.php/OpenDBX/DBMS_Datatypes

Perhaps this is not clear enough and we should add some related info to our wiki.

I hope this helps.

Greetings,

Mariano


On Thu, May 7, 2009 at 11:34 AM, Mariano Martinez Peck <[hidden email]> wrote:
Hi!

Do you know the database type of the column with value '2006-01-26 17:15:52' ?

cheers,

Mariano

2009/5/7 Hilaire Fernandes <[hidden email]>
Hello,

I have noted this problem, see attached log

--
http://blog.ofset.org/hilaire

_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project



_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project



--
http://blog.ofset.org/hilaire

_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: [SqueakDBX] Can't parse date

Mariano Martinez Peck


2009/5/7 Hilaire Fernandes <[hidden email]>
I am fetching data so I cannot change that.

From log, I can see you are doing a query that returns:

    #('1153' 'MA' 'WIMS' 'WIMS est un serveur d''exercices qui peut être...etc...

The '2006-01-26 17:15:52'  column is the number 7 from that query.

It would be nice you can then confirm me if you are using a TIMESTAMP  or a DATETIME. Just to see if that was the problem.

Cheers,

Mariano
 

Any way it is a  non bloquant problem.

Thanks

hilaire


2009/5/7 Mariano Martinez Peck <[hidden email]>

For MySQL you should use DATETIME instead of TIMESTAMP for those fields.

See http://www.linuxnetworks.de/doc/index.php/OpenDBX/DBMS_Datatypes

Perhaps this is not clear enough and we should add some related info to our wiki.

I hope this helps.

Greetings,

Mariano


On Thu, May 7, 2009 at 11:34 AM, Mariano Martinez Peck <[hidden email]> wrote:
Hi!

Do you know the database type of the column with value '2006-01-26 17:15:52' ?

cheers,

Mariano

2009/5/7 Hilaire Fernandes <[hidden email]>
Hello,

I have noted this problem, see attached log

--
http://blog.ofset.org/hilaire

_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project



_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project

_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project


_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: [SqueakDBX] Can't parse date

Hilaire Fernandes-4

2009/5/7 Mariano Martinez Peck <[hidden email]>

It would be nice you can then confirm me if you are using a TIMESTAMP  or a DATETIME. Just to see if that was the problem.


Oops sorry, yes it is a timestamp (column named ts). I am not sure but it may be a column automatically added by the MySql DB.

_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: [SqueakDBX] Can't parse date

Mariano Martinez Peck


2009/5/7 Hilaire Fernandes <[hidden email]>

2009/5/7 Mariano Martinez Peck <[hidden email]>

It would be nice you can then confirm me if you are using a TIMESTAMP  or a DATETIME. Just to see if that was the problem.


Oops sorry, yes it is a timestamp (column named ts). I am not sure but it may be a column automatically added by the MySql DB.


At least we know which is the problem :)

As I said, the solution (sorry if it isn't good enough) is to use datetime.

Cheers!

Mariano
 


_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project


_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: [SqueakDBX] Can't parse date

Mariano Martinez Peck


On Thu, May 7, 2009 at 11:58 AM, Mariano Martinez Peck <[hidden email]> wrote:


2009/5/7 Hilaire Fernandes <[hidden email]>

2009/5/7 Mariano Martinez Peck <[hidden email]>

It would be nice you can then confirm me if you are using a TIMESTAMP  or a DATETIME. Just to see if that was the problem.


Oops sorry, yes it is a timestamp (column named ts). I am not sure but it may be a column automatically added by the MySql DB.


At least we know which is the problem :)

As I said, the solution (sorry if it isn't good enough) is to use datetime.

Sorry I forgot to said that the supported database types depends of the backend. For example, in MySQL you must use datetime instead of timestamp, but in oracle you can use timestamp. This is not our "limitation" but openDBX one (or even client libraries). All this information is here: http://www.linuxnetworks.de/doc/index.php/OpenDBX/DBMS_Datatypes

Cheers,

Mariano

 

Cheers!

Mariano
 


_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project



_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: [SqueakDBX] Can't parse date

Mariano Martinez Peck


On Thu, May 7, 2009 at 12:08 PM, Mariano Martinez Peck <[hidden email]> wrote:


On Thu, May 7, 2009 at 11:58 AM, Mariano Martinez Peck <[hidden email]> wrote:


2009/5/7 Hilaire Fernandes <[hidden email]>

2009/5/7 Mariano Martinez Peck <[hidden email]>

It would be nice you can then confirm me if you are using a TIMESTAMP  or a DATETIME. Just to see if that was the problem.


Oops sorry, yes it is a timestamp (column named ts). I am not sure but it may be a column automatically added by the MySql DB.


At least we know which is the problem :)

As I said, the solution (sorry if it isn't good enough) is to use datetime.

Sorry I forgot to said that the supported database types depends of the backend. For example, in MySQL you must use datetime instead of timestamp, but in oracle you can use timestamp. This is not our "limitation" but openDBX one (or even client libraries). All this information is here: http://www.linuxnetworks.de/doc/index.php/OpenDBX/DBMS_Datatypes


Sorry for the amount of mails but I am thinking just know. I can be very easy to alternative (not the default way) to return the field as String if it cannot be mapped or converted. In this case, suppose you have '2006-01-26 17:15:52' and there is no mapping for TIMESTAMP, I can mapped it to an String. This will let you fetch all the results without problem. The only problem is that you will have Strings objects instead of TimeStamp objects.

What do you think ?

Cheers,

Mariano
 

Cheers,

Mariano

 

Cheers!

Mariano
 


_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project




_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: [SqueakDBX] Can't parse date

Hilaire Fernandes-4


2009/5/7 Mariano Martinez Peck <[hidden email]>


Sorry for the amount of mails but I am thinking just know. I can be very easy to alternative (not the default way) to return the field as String if it cannot be mapped or converted. In this case, suppose you have '2006-01-26 17:15:52' and there is no mapping for TIMESTAMP, I can mapped it to an String. This will let you fetch all the results without problem. The only problem is that you will have Strings objects instead of TimeStamp objects.

What do you think ?

Sure, this what I am doing, fetching raw data then I use fromDbxString: to convert that string to a DateAndTime.

For my limited usage, SqueakDBX works pretty well.

Hilaire


--
http://blog.ofset.org/hilaire

_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: [SqueakDBX] Can't parse date

Mariano Martinez Peck


2009/5/7 Hilaire Fernandes <[hidden email]>


2009/5/7 Mariano Martinez Peck <[hidden email]>


Sorry for the amount of mails but I am thinking just know. I can be very easy to alternative (not the default way) to return the field as String if it cannot be mapped or converted. In this case, suppose you have '2006-01-26 17:15:52' and there is no mapping for TIMESTAMP, I can mapped it to an String. This will let you fetch all the results without problem. The only problem is that you will have Strings objects instead of TimeStamp objects.

What do you think ?

Sure, this what I am doing, fetching raw data then I use fromDbxString: to convert that string to a DateAndTime.

Ok. That's perfect :)  But, you have do it manually isn't it ? I mean, you iterate the collection an convert that special field from string to DateAndTime using fromDbxString:
 


For my limited usage, SqueakDBX works pretty well.

I am glad about it!  Remember any comment or suggestion is welcome.

Cheers,

Mariano
 


Hilaire
_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project


_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: [SqueakDBX] Can't parse date

Hilaire Fernandes-4


2009/5/7 Mariano Martinez Peck <[hidden email]>

Ok. That's perfect :)  But, you have do it manually isn't it ? I mean, you iterate the collection an convert that special field from string to DateAndTime using fromDbxString:

Right

Hialire

_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project