On 27 jun, 06:23, mdipierro <mdipie...@cs.depaul.edu> wrote: > web2py does not generate those numbers, the database does. Check what > is in record 263227
Thank Massimo Yes, I know. But if I look from the database administrator of web2py, the IDs are correct. Let's see if the following helps. I tried another table and works well. If I change the code: response.flash = int (form.vars.id) by: response.flash = form.vars.id The following error occurs: Traceback (most recent call last): File "/usr/home/web2py/gluon/restricted.py", line 178, in restricted exec ccode in environment File "/usr/home/web2py/applications/agprueba/views/expedientes/ subirdocumento.html", line 38, in <module> File "/usr/home/web2py/gluon/globals.py", line 105, in write self.body.write(xmlescape(data)) File "/usr/home/web2py/gluon/html.py", line 104, in xmlescape return data.xml() File "/usr/home/web2py/gluon/sql.py", line 1467, in __getattr__ self.__allocate() File "/usr/home/web2py/gluon/sql.py", line 1462, in __allocate raise Exception, "undefined record" Exception: undefined record If I change it by: response.flash = type(form.vars.id) return <class 'gluon.sql.Reference'> The only change made to the table that gives the problem is that it triggers have been defined, but this should not affect anything. Anyway I will check with the administrator. Jose