[Zope] Weird SQL Relay conversion error in Zope
Mike Driscoll
mdriscoll at co.marshall.ia.us
Fri May 9 09:31:29 EDT 2008
Hi,
I am working on a web app that interfaces with Microsoft SQL Server from Ubuntu through SQL Relay. I will be getting data from multiple databases. The issue seems to be that either Zope or SQL Relay cannot handle the Decimal type if the value is a null. If I do a query like this:
SELECT * from myDatabase
I get the following:
<error>
Site Error
An error was encountered while publishing this resource.
InvalidOperation
Sorry, a site error occurred.
Traceback (innermost last):
* Module ZPublisher.Publish, line 194, in publish_module_standard
* Module Products.PlacelessTranslationService.PatchStringIO, line 34, in new_publish
* Module ZPublisher.Publish, line 146, in publish
* Module Zope2.App.startup, line 222, in zpublisher_exception_hook
* Module ZPublisher.Publish, line 115, in publish
* Module ZPublisher.mapply, line 88, in mapply
* Module ZPublisher.Publish, line 41, in call_object
* Module Shared.DC.ZRDB.Connection, line 115, in manage_test
* Module Products.ZSQLRelayDA.db, line 86, in query
* Module decimal, line 571, in __new__
* Module decimal, line 2267, in _raise_error
InvalidOperation: (Also, the following error occurred while attempting to render the standard error message, please see the event log for full details: '@@plone')
</error>
If I change it to "SELECT empid, reg from myDatabase" it will work as long as reg is not a NULL. I can get it to work if I use "isnull" functions on all my decimal type fields, but I would like to avoid that. Is this a known issue with a workaround?
I am using Zope 2.9.4-final on Ubuntu with SQL Relay 0.39.4.
Mike Driscoll
Applications Specialist
MCIS - Technology Center
More information about the Zope
mailing list