From 3131f834ef0e4176a54944516269da3683243713 Mon Sep 17 00:00:00 2001 From: mdipierro Date: Fri, 4 Dec 2015 12:36:20 -0600 Subject: [PATCH] fixed web2py bug Error in DB2 for system i Adapter when inserting record into table defined in specific library #1034 --- pydal/adapters/db2.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pydal/adapters/db2.py b/pydal/adapters/db2.py index 3caa88c98..f81f6e857 100644 --- a/pydal/adapters/db2.py +++ b/pydal/adapters/db2.py @@ -98,7 +98,7 @@ def execute(self,command,placeholders=None): return self.log_execute(command) def lastrowid(self,table): - self.execute('SELECT DISTINCT IDENTITY_VAL_LOCAL() FROM %s;' % table) + self.execute('SELECT DISTINCT IDENTITY_VAL_LOCAL() FROM %s;' % table.sqlsafe) return long(self.cursor.fetchone()[0]) def rowslice(self,rows,minimum=0,maximum=None):