tg_error report error in the form validation,
But you got SQL error !

the good way is :

if tg_errors:
        flash("There was a problem with the form!")
        raise redirect('/newaccount') # Not sure about what you want
to do HERE

try:
 
result=Bdata(alias=alias,beneficiary=beneficiary,account=account,bank=bank)
except:
    flash("ATTENTION --> Record was not inserted ! Beneficiary
exists")
else:
    flash("New Beneficiary Account Record added ok")

raise redirect('/bene')

                 raise redirect('/bene')


On 24 mar, 15:16, "DarkBlue" <[EMAIL PROTECTED]> wrote:
> Apparently , changing the if ... else to try ... except
> solves this issue.
>
> Db


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TurboGears" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to