I call this 127.0.0.1:8000/web_ocms/amc/newamcmaster/edit/amc_master/3 by clicking the edit button of the recor in the grid, and the edit form for the record is displayed. After editing when I submit error ticket is issued stating id column cannot be updated. Pl. help. Thanks for your time. The ticket is
Error ticket for "web_ocms" Ticket ID 127.0.0.1.2017-05-23.17-15-24.8a493eb8-5c35-4dd1-8ade-97ef1e190c7c <class 'pyodbc.ProgrammingError'> ('42000', "[42000] [Microsoft][ODBC SQL Server Driver][SQL Server]Cannot update identity column 'id'. (8102) (SQLExecDirectW)") Version web2py™ Version 2.14.6-stable+timestamp.2016.05.10.00.21.47 Python Python 2.7.5: D:\Python\python.exe (prefix: D:\Python) Traceback 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. 15. 16. 17. 18. 19. 20. 21. 22. 23. 24. Traceback (most recent call last): File "D:\web2py\gluon\restricted.py", line 227, in restricted exec ccode in environment File "D:/web2py/applications/web_ocms/controllers/amc.py" <http://127.0.0.1:8000/admin/default/edit/web_ocms/controllers/amc.py>, line 49, in <module> File "D:\web2py\gluon\globals.py", line 417, in <lambda> self._caller = lambda f: f() File "D:/web2py/applications/web_ocms/models/db.py" <http://127.0.0.1:8000/admin/default/edit/web_ocms/models/db.py>, line 140, in wrapper return callee() File "D:/web2py/applications/web_ocms/controllers/amc.py" <http://127.0.0.1:8000/admin/default/edit/web_ocms/controllers/amc.py>, line 42, in newamcmaster grid = SQLFORM.grid(db.amc_master,user_signature=False,fields=list_of_fields,oncreate=create_new_amc) File "D:\web2py\gluon\sqlhtml.py", line 2352, in grid next=referrer) File "D:\web2py\gluon\html.py", line 2298, in process self.validate(**kwargs) File "D:\web2py\gluon\html.py", line 2236, in validate if self.accepts(**kwargs): File "D:\web2py\gluon\sqlhtml.py", line 1744, in accepts self.id_field_name]).update(**fields) File "D:\web2py\gluon\packages\dal\pydal\objects.py", line 2054, in update ret = db._adapter.update("%s" % table._tablename, self.query, fields) File "D:\web2py\gluon\packages\dal\pydal\adapters\base.py", line 1031, in update raise e ProgrammingError: ('42000', "[42000] [Microsoft][ODBC SQL Server Driver][SQL Server]Cannot update identity column 'id'. (8102) (SQLExecDirectW)") Error snapshot [image: help] <http://127.0.0.1:8000/admin/default/ticket/web_ocms/127.0.0.1.2017-05-23.17-15-24.8a493eb8-5c35-4dd1-8ade-97ef1e190c7c#> <class 'pyodbc.ProgrammingError'>(('42000', "[42000] [Microsoft][ODBC SQL Server Driver][SQL Server]Cannot update identity column 'id'. (8102) (SQLExecDirectW)")) inspect attributes Frames - *File D:\web2py\gluon\restricted.py in restricted at line 227* code arguments variables - *File D:\web2py\applications\web_ocms\controllers\amc.py in <module> at line 49* code arguments variables - *File D:\web2py\gluon\globals.py in <lambda> at line 417* code arguments variables - *File D:\web2py\applications\web_ocms\models\db.py in wrapper at line 140* code arguments variables - *File D:\web2py\applications\web_ocms\controllers\amc.py in newamcmaster at line 42* code arguments variables - *File D:\web2py\gluon\sqlhtml.py in grid at line 2352* code arguments variables - *File D:\web2py\gluon\html.py in process at line 2298* code arguments variables - *File D:\web2py\gluon\html.py in validate at line 2236* code arguments variables - *File D:\web2py\gluon\sqlhtml.py in accepts at line 1744* code arguments variables - *File D:\web2py\gluon\packages\dal\pydal\objects.py in update at line 2054* code arguments variables - *File D:\web2py\gluon\packages\dal\pydal\adapters\base.py in update at line 1031* code arguments variables Function argument list (self=<pydal.adapters.mssql.MSSQL2Adapter object>, tablename='amc_master', query=<Query (amc_master.id = 3)>, fields=[(<pydal.objects.Field object>, None), (<pydal.objects.Field object>, 'bid'), (<pydal.objects.Field object>, None), (<pydal.objects.Field object>, None), (<pydal.objects.Field object>, None), (<pydal.objects.Field object>, None), (<pydal.objects.Field object>, None), (<pydal.objects.Field object>, None), (<pydal.objects.Field object>, None), (<pydal.objects.Field object>, 3L), (<pydal.objects.Field object>, None), (<pydal.objects.Field object>, None), (<pydal.objects.Field object>, None), (<pydal.objects.Field object>, datetime.datetime(2017, 5, 23, 16, 59, 23)), (<pydal.objects.Field object>, None), (<pydal.objects.Field object>, None), (<pydal.objects.Field object>, None), (<pydal.objects.Field object>, None), (<pydal.objects.Field object>, None), (<pydal.objects.Field object>, None), ...]) Code listing 1026. 1027. 1028. 1029. 1030. 1031. 1032. 1033. 1034. 1035. except Exception: e = sys.exc_info()[1] table = self.db[tablename] if hasattr(table,'_on_update_error'): return table._on_update_error(table,query,fields,e) raise e try: return self.cursor.rowcount except: return None Variables e ProgrammingError('42000', "[42000] [Microsoft][O...e identity column 'id'. (8102) (SQLExecDirectW)") -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.