[Pharo-project] [SqueakDBX] Can't parse date
Hello, I have noted this problem, see attached log -- http://blog.ofset.org/hilaire
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 <hilaire@ofset.org>
Hello,
I have noted this problem, see attached log
-- http://blog.ofset.org/hilaire
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
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 < marianopeck@gmail.com> 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 <hilaire@ofset.org>
Hello,
I have noted this problem, see attached log
-- http://blog.ofset.org/hilaire
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
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 <marianopeck@gmail.com>
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 < marianopeck@gmail.com> 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 <hilaire@ofset.org>
Hello,
I have noted this problem, see attached log
-- http://blog.ofset.org/hilaire
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
2009/5/7 Hilaire Fernandes <hilaire@ofset.org>
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 <marianopeck@gmail.com>
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 < marianopeck@gmail.com> 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 <hilaire@ofset.org>
Hello,
I have noted this problem, see attached log
-- http://blog.ofset.org/hilaire
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
-- http://blog.ofset.org/hilaire
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
2009/5/7 Mariano Martinez Peck <marianopeck@gmail.com>
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.
2009/5/7 Hilaire Fernandes <hilaire@ofset.org>
2009/5/7 Mariano Martinez Peck <marianopeck@gmail.com>
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 Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
On Thu, May 7, 2009 at 11:58 AM, Mariano Martinez Peck < marianopeck@gmail.com> wrote:
2009/5/7 Hilaire Fernandes <hilaire@ofset.org>
2009/5/7 Mariano Martinez Peck <marianopeck@gmail.com>
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 Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
On Thu, May 7, 2009 at 12:08 PM, Mariano Martinez Peck < marianopeck@gmail.com> wrote:
On Thu, May 7, 2009 at 11:58 AM, Mariano Martinez Peck < marianopeck@gmail.com> wrote:
2009/5/7 Hilaire Fernandes <hilaire@ofset.org>
2009/5/7 Mariano Martinez Peck <marianopeck@gmail.com>
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 Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
2009/5/7 Mariano Martinez Peck <marianopeck@gmail.com>
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
2009/5/7 Hilaire Fernandes <hilaire@ofset.org>
2009/5/7 Mariano Martinez Peck <marianopeck@gmail.com>
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
-- http://blog.ofset.org/hilaire
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
participants (2)
-
Hilaire Fernandes -
Mariano Martinez Peck