hello all

Here is a patch for gluon/sql.py to fix the raise of exception when
executing directly an sql statement.
For example:
    db.executesql("ALTER SEQUENCE table_id_seq RESTART WITH 1;")

--------------------------------------------
--- sql.py  2009-05-25 11:48:49.000000000
+0800
+++ sql.py  2009-06-17 10:08:30.000000000
+0800
@@ -944,7 +944,10
@@
     def executesql(self,
query):
         self['_lastsql'] =
query
         self._execute
(query)
-        return self._cursor.fetchall
()
+
try:
+            return self._cursor.fetchall
()
+
except:
+            return
None

     def _update_referenced_by(self,
other):
         for tablename in
self.tables:

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web2py Web Framework" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to