No takers yet on this one?
At the very least, can anyone out there verify whether they've had ANY kind of Web2py delete feature work on a row within table that has foreign keys (with enforced cascading deletes)? To re-emphasize, a row can be deleted from the problematic table using SQL Studio with no problems. -Todd B. On Jan 30, 4:37 pm, NetHead <tbnethe...@yahoo.com> wrote: > Okay.... one last bit of additional experimentation info to share > here: > > I coded two simple hardcoded functions and called them explicitly from > the browser to see if my delete problem was related specifically to > the SQLFORM feature, or to Web2py in general. > > It appears that my problem is rooted directly in Web2py's linkage to > my SQL Server database using PYODBC. > > This test *failed*.... the row remained in the BW_items table: > > def delete_test(): > db_bosswalk(db_bosswalk.BW_items.id==3986).delete() > > This test worked correctly. The specified row in the BW_dept_info > table was removed. > > def delete_test(): > db_bosswalk(db_bosswalk.BW_dept_info.id==148).delete() > > The difference between the two tests? The BW_items table has 3 > foreign keys from 3 other tables associated with it. These foreign > keys are set up to do a cascading delete from the other 3 tables when > a row from BW_items is deleted. > > The BW_dept_info table has NO foreign keys associated with it. > > So the $64,000 question now is..... Has anyone else out there used the > Web2py delete feature to delete rows from a SQL Server table that has > foreign key / constraints to other tables? > > Keep in mind that no SQL errors are being thrown or ticketed. The > data just doesn't get deleted. > > Thanks, > > -Todd B. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---