Okay, thank you for taking a look.

It's the same application pointing to the same view in the same DB though, 
so you can understand my confusion.
I'll try Anthony's suggestion of v1.77 - if that fails as well I guess I'll 
try downgrading some drivers.

I'm REALLY not ready to rewrite this thing at this point!

On Thursday, March 29, 2012 1:45:01 PM UTC-4, Massimo Di Pierro wrote:
>
> I am pretty sure this is not an effect of the upgrade of web2py. This is 
> an error from the database saying it it no able to perform and "UPDATE" 
> record on the "Accounts" view because is "affects multiple base tables".
>
> I cannot say if the problem is the version of the database driver.
>
> On Thursday, 29 March 2012 12:25:01 UTC-5, Willoughby wrote:
>>
>> 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
>>>>
>>>>  
>>>>
>>>

Reply via email to