dtml-try with z-sql
Hi all, I have DTML-Method like below <dtml-try> <dtml-call "deleteUser(USERNAME=USERNAME)"> <dtml-except> An error occurred. Entry was <b>NOT</b> deleted. </dtml-try> deleteUser is Z-SQL method.USERNAME is the argument in Z-SQL method also column name. When i click erase button it succesfully deletes record.But if i enter an invalid username it did not throw any exceptions. Please help REgards
I'm not familiar with DTML, I would like to: deleteUser(USERNAME=invalid USERNAME) Does not throw an exception, Should be judged through a function return value. 2013/2/1 murat bilal <murat.bilal@gmail.com>
Hi all,
I have DTML-Method like below <dtml-try> <dtml-call "deleteUser(USERNAME=USERNAME)">
<dtml-except> An error occurred. Entry was <b>NOT</b> deleted. </dtml-try>
deleteUser is Z-SQL method.USERNAME is the argument in Z-SQL method also column name. When i click erase button it succesfully deletes record.But if i enter an invalid username it did not throw any exceptions.
Please help
REgards
_______________________________________________ Zope-Dev maillist - Zope-Dev@zope.org https://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - https://mail.zope.org/mailman/listinfo/zope-announce https://mail.zope.org/mailman/listinfo/zope )
I'm not familiar with DTML. In my opinion: deleteUser(USERNAME=invalid USERNAME) Does not throw an exception, Should be judged through a function return value. 2013/2/1 Jian Aijun <jianaijun@gmail.com>
I'm not familiar with DTML, I would like to:
deleteUser(USERNAME=invalid USERNAME)
Does not throw an exception,
Should be judged through a function return value.
2013/2/1 murat bilal <murat.bilal@gmail.com>
Hi all,
I have DTML-Method like below <dtml-try> <dtml-call "deleteUser(USERNAME=USERNAME)">
<dtml-except> An error occurred. Entry was <b>NOT</b> deleted. </dtml-try>
deleteUser is Z-SQL method.USERNAME is the argument in Z-SQL method also column name. When i click erase button it succesfully deletes record.But if i enter an invalid username it did not throw any exceptions.
Please help
REgards
_______________________________________________ Zope-Dev maillist - Zope-Dev@zope.org https://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - https://mail.zope.org/mailman/listinfo/zope-announce https://mail.zope.org/mailman/listinfo/zope )
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 02/01/2013 04:27 AM, murat bilal wrote:
I have DTML-Method like below <dtml-try> <dtml-call "deleteUser(USERNAME=USERNAME)">
<dtml-except> An error occurred. Entry was <b>NOT</b> deleted. </dtml-try>
deleteUser is Z-SQL method.USERNAME is the argument in Z-SQL method also column name. When i click erase button it succesfully deletes record.But if i enter an invalid username it did not throw any exceptions.
This issue is unrelated to DTML / ZSQLMethods. SQL statements like the following:: DELETE FROM some_table WHERE id = 123; don't cause exceptions to be raised for an unknown value like 123; they just affect no rows. If you need an error raised, you need to do something like create a stored procedure on the server which does that. Tres. - -- =================================================================== Tres Seaver +1 540-429-0999 tseaver@palladion.com Palladion Software "Excellence by Design" http://palladion.com -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Using GnuPG with undefined - http://www.enigmail.net/ iEYEARECAAYFAlEL7m8ACgkQ+gerLs4ltQ5uVgCfYRw7x3XAfwsdoFkJCNZm1U3H DKgAoLT358rI08s8GMwanffFV4jT4f8Y =StFb -----END PGP SIGNATURE-----
participants (3)
-
Jian Aijun -
murat bilal -
Tres Seaver