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 |
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, _______________________________________________ Pharo-project mailing list [hidden email] 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 <[hidden email]> wrote: Hi! _______________________________________________ Pharo-project mailing list [hidden email] 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 <[hidden email]> For MySQL you should use DATETIME instead of TIMESTAMP for those fields. -- http://blog.ofset.org/hilaire _______________________________________________ Pharo-project mailing list [hidden email] http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project |
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
_______________________________________________ Pharo-project mailing list [hidden email] http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project |
2009/5/7 Mariano Martinez Peck <[hidden email]>
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 |
2009/5/7 Hilaire Fernandes <[hidden email]>
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 |
On Thu, May 7, 2009 at 11:58 AM, Mariano Martinez Peck <[hidden email]> wrote:
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
_______________________________________________ Pharo-project mailing list [hidden email] http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project |
On Thu, May 7, 2009 at 12:08 PM, Mariano Martinez Peck <[hidden email]> wrote:
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
_______________________________________________ Pharo-project mailing list [hidden email] http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project |
2009/5/7 Mariano Martinez Peck <[hidden email]>
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 |
2009/5/7 Hilaire Fernandes <[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:
I am glad about it! Remember any comment or suggestion is welcome. Cheers, Mariano
_______________________________________________ Pharo-project mailing list [hidden email] http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project |
2009/5/7 Mariano Martinez Peck <[hidden email]>
Right Hialire _______________________________________________ Pharo-project mailing list [hidden email] http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project |
Free forum by Nabble | Edit this page |