` Comment on an Icetips Article
Icetips - Templates, Tools & Utilities for Clarion Developers

Templates, Tools and Utilities
for Clarion Developers

Add a comment to an Icetips Article

Please add your comments to this article. Please note that you must provide both a name and a valid email address in order for us to publish your comment. Comments are moderated and are not visible until they have been approved. Spam is never approved!

Your Name:  
Email:  
Header text/Subject:  

Please enter your comment in the box below:

Back to article list   Search Articles     Add Comment     Printer friendly     Direct link  

SQL Related Articles: Creating an exception in FireBird that sends information to Clarion
2004-03-29 -- Arno Rog
 
Newsgroups: comp.lang.clarion (with Gemin ODBC, could you please confirm Firebird ODBC?) Create an exception with the name 'costs_to_much', e.g. 'I'm sorry, there is not enough money to buy this product' Create a stored procedure, e.g. SP_CHECK_PRICE to calculate if there is enough money to buy a certain product, kind of: IF savings < price_of_product EXCEPTION costs_to_much; In your clarion app do the following: Filename{PROP:SQL} = 'execute SP_CHECK_PRICE' ! And now what it is all about!!! IF FILEERRORCODE() MESSAGE(FILEERROR()) END Above example pops the message 'exception 1. I'm sorry, there is not enough money to buy this product' on my screen! Mind you, make sure you read page 165 and further in the DataDef Manual. In Firebird, when a procedure encounters an exception, it terminates that particular procedure and undoes any actions performed (directly or indirectly) by that procedure. Hope this helps. Arno Rog Amsterdam


Today is November 21, 2024, 7:08 am
This article has been viewed 35218 times.
Google search has resulted in 197 hits on this article since January 25, 2004.



Back to article list   Search Articles   Add Comment   Printer friendly

Login

User Name:

Password: