[Zope3-Users] SQL Database Bug?
David Johnson
djohnson at jsatech.com
Tue May 9 12:40:15 EDT 2006
The following code seems to be buggy somehow, but I'm not clear how or why.
It seems for some reason that the first SQL "insert" query I run does not
get processed, while the second one does. I've tried numerous variations on
this with no success. I've done inserts before without problems.
# The transaction ID "dj3" already exists in all cases, so both
queryForResults calls should
# throw an exception, however only the second, third, fourth do.
query = "insert into transactions (transid) values ('dj3')"
print query
queryForResults(self.db,query)
queryForResults(self.db,query)
queryForResults(self.db,query)
queryForResults(self.db,query)
Generates:
DatabaseException: (1062, "Duplicate entry 'dj3' for key 1")
--
David Johnson
djohnson at jsatech.com
201 Main Street Suite 1320
Fort Worth, TX 76102
(877) 572-8324 x2200
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.zope.org/pipermail/zope3-users/attachments/20060509/5e5b8ed2/attachment.htm
More information about the Zope3-users
mailing list