Dieters assumption was right. LAST_INSERTED_ID() returns a numeric value and that seems to be the problem. So if I change the statement as this: SELECT CONV(LAST_INSERT_ID(),10,10) it works (CONV returns a string!) P.S. Soren, maybe you can update your HowTo with a short note. Another possibilty instead of using LAST_INSERT_ID can be using MAX(). That should work too. Thanks Arno On Sat, 06 Jan 2001, Dieter Maurer wrote: > Arno Gross writes:
SELECT LAST_INSERT_ID()
This method works with Zope 2.2.4 under Linux and MySQL 3.22.32 but I got an error with Zope 2.2.2 under NT 4.0 and MySQL 3.22.29 Error, exceptions.KeyError: unhandled Sieht aus, als könnte der MySQL Anschluss den Rückgabewert von "LAST_INSERT_ID" nicht in einen Python Datentyp wandeln, würde deshalb gerne eine "unhandled" Funktion aus einen Dictionary auslesen, die leider nicht drin ist.
Sieht für mich nach einem Upgrade auf eine neuere Version von MySQL bzw. seinen Python Anschluss aus.
Allerdings müsste man zunächst den Traceback genau anschauen, ob meine Vermutung auch wirklich zutrifft.
Dieter