On Fri, 18 Feb 2000, Sam Gendler wrote:
There was a thread awhile back about having the DA return the value of the auto_increment fields (if available) as the result set to an insert query. I suspect this is more in the code of the zope DA than the python adaptor, but if you know your way around the zope DA, perhaps you could create a patch. I made a quick attempt a while back, and failed miserably.
Since the patched ZMySQLDA only uses _mysql (the C interface part used by MySQLdb), you should be able to get the info you want from db.insert_id(), where db is the database connection object. Note that this will return a long integer. I don't know how you would incorporate this into ZMySQLDA, however. (The above method now works on MySQLdb connection objects as well, as of 0.1.2.) -- andy dustman | programmer/analyst | comstar.net, inc. telephone: 770.485.6025 / 706.549.7689 | icq: 32922760 | pgp: 0xc72f3f1d "Therefore, sweet knights, if you may doubt your strength or courage, come no further, for death awaits you all, with nasty, big, pointy teeth!"