After a successful insert, either one of these will work: int(cursor.execute("select IDENTITY_VAL_LOCAL() from SYSIBM.SYSDUMMY1").fetchone()[0]) int(cursor.execute("select IDENTITY_VAL_LOCAL() from SYSIBM.SYSDUMMY1").next()[0])
the result before int() is <class 'decimal.Decimal'> Note that SYSIBM.SYSDUMMY1 is probably only good for db2/400. Thanks go to mkleehammer of pyodbc for his help on this. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "web2py Web Framework" group. To post to this group, send email to web2py@googlegroups.com To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/web2py?hl=en -~----------~----~----~----~------~----~------~--~---