[Zope] Problems inserting into MySQL
Ed Leafe
ed@leafe.com
Thu, 25 Jul 2002 15:22:58 -0400
I'm working on a site whose data is stored in MySQL. So far I've
had no problems with the database connection, but one just came up. The
user fills in a form, and the submit calls a Python script that formats
the data and passes it to the Z SQL Method that contains the INSERT INTO
command. The only data access is this single INSERT command, and it
succeeds, at least in the sense that the data is properly inserted into
the table. But I get this ugly and hard to understand error message:
<H2>Site Error</H2>
<P>An error was encountered while publishing this resource.
</P>
<P><STRONG>_mysql_exceptions.NotSupportedError</STRONG></P>
Sorry, a site error occurred.<p>
<!--
Traceback (innermost last):
File /usr/local/ZopeBase/lib/python/ZPublisher/Publish.py, line 150,
in publish_module
File /usr/local/ZopeBase/lib/python/ZPublisher/Publish.py, line 106,
in publish
File /usr/local/ZopeBase/lib/python/Zope/__init__.py, line 178, in
abort
File /usr/local/ZopeBase/lib/python/ZODB/Transaction.py, line 107, in
abort
File /usr/local/ZopeBase/lib/python/Shared/DC/ZRDB/TM.py, line 60, in
abort
File /usr/local/ZopeBase/lib/python/Products/ZMySQLDA/db.py, line 328,
in _abort
NotSupportedError: (1196, "Warning: Some non-transactional changed
tables couldn't be rolled back")
-->
OK, I get that something's wrong, but how do I go about figuring
out the problem? I tried using the src__=1 trick to view the generated
SQL statement, and that was fine: if I plugged it into a MySQL GUI
interface, it ran without problem. And even running through Zope, the
data does get properly inserted into the table. So what's up with this
error message?
___/
/
__/
/
____/
Ed Leafe
http://leafe.com/
http://foxcentral.net