Thanks for the help! Traceback below. "Accounts" is a view on my
SQLServer DB. Looking at it, wonder if it's a difference in PYODBC
versions between prod and my desktop.
Traceback (most recent call last):
File "C:\web2py\gluon\restricted.py", line 205, in restricted
exec ccode in environment
File "C:/web2py/applications/TheReckoning/controllers/accounts.py"
<http://127.0.0.1:8000/admin/default/edit/TheReckoning/controllers/accounts.py>,
line 60, in <module>
File "C:\web2py\gluon\globals.py", line 173, in <lambda>
self._caller = lambda f: f()
File "C:/web2py/applications/TheReckoning/controllers/accounts.py"
<http://127.0.0.1:8000/admin/default/edit/TheReckoning/controllers/accounts.py>,
line 28, in account_detail
if form.accepts(request.vars,session) :
File "C:\web2py\gluon\sqlhtml.py", line 1272, in accepts
self.table._db(self.table._id ==
self.record[self.id_field_name]).update(**fields)
File "C:\web2py\gluon\dal.py", line 7591, in update
return self.db._adapter.update(tablename,self.query,fields)
File "C:\web2py\gluon\dal.py", line 1116, in update
self.execute(sql)
File "C:\web2py\gluon\dal.py", line 1392, in execute
return self.log_execute(*a, **b)
File "C:\web2py\gluon\dal.py", line 1386, in log_execute
ret = self.cursor.execute(*a, **b)
ProgrammingError: ('42000', "[42000] [Microsoft][ODBC SQL Server Driver][SQL
Server]View or function 'Accounts' is not updatable because the modification
affects multiple base tables. (4405) (SQLExecDirectW)")
On Thursday, March 29, 2012 12:30:20 PM UTC-4, Massimo Di Pierro wrote:
>
> The earliest I have is 1.80.1.
> Yet, it should work with the latest. Send me the error you get and I will
> be happy to take a look.
>
> Massimo
>
>
> On Thursday, 29 March 2012 10:46:20 UTC-5, Anthony wrote:
>>
>> Unfortunately the code blows up with current web2py - something about
>>> 'updateable' views no longer being allowed.
>>>
>>
>> What does "updateable views" mean? Are you talking about generic views?
>> If so, they can be enabled via the following in a model file:
>>
>> response.generic_patterns = ['*']
>>
>> Though for security reasons, it's not recommended to be quite so liberal
>> with allowing generic views. See
>> http://web2py.com/books/default/chapter/29/10#Generic-views.
>>
>> If that's not the issue, have you actually tried version 1.77 (or other
>> later versions) -- even if you app doesn't work with 1.99, it might work
>> with some other earlier version.
>>
>> Anyway, perhaps Massimo has older versions available somewhere.
>>
>> Anthony
>>
>>
>>
>