MySQL and DateTime problem
Jan B. Krejčí
janbkrejci at gmail.com
Tue Oct 11 08:59:25 UTC 2005
Hi there,
since Alan Reider's e-mail address seems to be out of order, I am
posting here, hoping that the message reaches him. Anyway if anybody
can say anything valuable about the problem mentioned, I'll appreciate
it.
-----------------------cut here------------------
Hi Alan,
I've been using your MySQL Squeak driver and Persistence succesfully
for long time. Maybe you still remember our conversation about
TimeStamp>>printSqlOn method.
Nowadays I am facing a problem, which occured after my customer
upgraded to MySQL 4.1.14. Since that moment my code crashes when it
tries to call PersistentObject>>update. The problem is invalid query
constructed for updating record containing DateTime field. Let's
imagine some persistent object containing integer and datetime fields.
1) I create new instance of MyPersistentObject, say "mpo", fill in
integer with 1 and datetime with TimeStamp current. Then I call
mpo>>create. Works OK.
2) I take the object back from database (like mpo _ MyPersistentObject
all first.
3) I change the integer to 2 and call mpo update. CRASH! Debugger
shows that I am trying to run something like "update
mypersistentobject set intfield = 2, datetimefield = a ByteArray #(123
234 etc.)..." (it's not exact, since I'm writing it by hand using my
human memory only).
Have you seen such a problem already? Do you please have some tip how
to get rid of it?
Thanks in advance for your kindly help
--
.:jbk:.
Jan B. Krejci
More information about the Squeak-dev
mailing list
|