[web2py:15603] Using Try Except to detect a specific MS SQL server error and flash a custom error msg

2009-01-29 Thread NetHead
Greetings everyone! This is my first post on this forum. My appreciation (in advance) for any help any of you can lend me. SYNOPSIS: My app uses Web2py along with MS Sql Server. I placed a unique constraint on a column in my SQL table, and if a user attempts to enter a duplicate value in th

[web2py:15607] Re: Using Try Except to detect a specific MS SQL server error and flash a custom error msg

2009-01-29 Thread NetHead
or the 'IntegrityError'? Grazie! Todd B. On Jan 29, 2:11 pm, mdipierro wrote: > According to this:http://code.google.com/p/pyodbc/wiki/Errors > it should not do so. > > Can you provide an example of an error that raises IntegrityError but > should not? > > Mas

[web2py:15614] Re: Using Try Except to detect a specific MS SQL server error and flash a custom error msg

2009-01-30 Thread NetHead
n 29, 8:23 pm, mdipierro wrote: > probably you need > > from pyodbc import IntegrityError > > do not import it from psycopg since that is a different exception than > the one thrown by mssql > > Massimo > > On Jan 29, 2:38 pm, NetHead wrote: > > > > >

[web2py:15620] "deletable=True" not working in SQLFORM

2009-01-30 Thread NetHead
Hello again! Say... has anyone had any problems getting the "deletable" function to work properly with SQL FORMs?My database is MS SQL Server, btw. Here's my code: items_form=SQLFORM(db_bosswalk.BW_items, record=items_records[0], deletable=True, showid=False, delete_label='Delete this item

[web2py:15628] Re: "deletable=True" not working in SQLFORM

2009-01-30 Thread NetHead
NOTE to everyone: I did a little experiment by coding a test controller using the basic SQLFORM example from page 169 of Massimo's book, and picked a different table in my database that had no direct relationships to any of the other tables. Delete's using the check box now worked. So again..

[web2py:15629] Re: "deletable=True" not working in SQLFORM

2009-01-30 Thread NetHead
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 di

[web2py:15661] Re: "deletable=True" not working in SQLFORM

2009-01-31 Thread NetHead
tudio with no problems. -Todd B. On Jan 30, 4:37 pm, NetHead 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 specifica

[web2py:15782] Re: "deletable=True" not working in SQLFORM

2009-02-02 Thread NetHead
FINAL OBSERVATION AND REQUEST FOR FEEDBACK. Here's the final bit of feedback/info I can offer. At the suggestion of a co-worker, I logged onto the server where our Web2py app is hosted, and brought up an IDLE Python session. I typed in the following lines to determine if na

[web2py:16451] A little more explanation about DAL's "required=true" requested......

2009-02-17 Thread NetHead
BASE QUESTION: What does "required=true" in the DAL actually do? Could someone describe a "real-life" scenario where the use of this setting/command would be useful or necessary? In the course of trying make sure that a user doesn't leave an important column blank on an input form, the issue o

[web2py:21641] os.system command works in Python shell, but not in a Web2py function

2009-05-11 Thread NetHead
Hey Gang: When a user visits a page, I am attempting to run the following lines: import os os.system("E:/Python/web2py_src/web2py/applications/TheReckoning/ prod_scripts/dropship_copy_to_opc.bat") This exact command works fine from a Python interactive session, BUT when put into a Web2py fu