Hyderabad Jobs Book Website FREE PowerBuilder Training I Love Hyderabad Hyderabad Colleges
Home Business Emails Hyderabad Classifieds Contact Us
7 Wonders of Hyderabad Web Hosting Yellow Pages Our Network

 
Webpowerbuilder.hyderabad-colleges.com

Advanced PowerBuilder

HomePrevious Lesson: Error Event
Next Lesson: Other Non-Mapped, but Important DataWindow Events

SQLPreview Event

This event is triggered whenever a SQL statement is sent to the database. That means, this is the right place (only place) to see and modify the SQL statement before sending it to the database. You can also skip sending the current SQL statement or stop the whole operation by returning appropriate return code.

For example, see the SQL statement sent by PowerBuilder to the database, by writing the following code in the SQLPreview' event in dw_product and dw_query. We are writing in dw_query because, we retrieve the data from dw_query and update the database using dw_product DataWindows. Writing the following statement in both DataWindows, display the SQL statements while retrieving as well as while updating the database.
MessageBox( "SQL", SqlSyntax )

Now, run the application and retrieve the data. PowerBuilder will display the SELECT statement. Do some changes in the data and save the changes back to the database. You will see INSERT/ UPDATE/ DELETE statements, depending on the changes you do.
HomePrevious Lesson: Error Event
Next Lesson: Other Non-Mapped, but Important DataWindow Events

Copyright © 1996 - 2006 HamaraShehar.com Pvt. Ltd. All Rights Reserved.
Domain Registration, Website Design, Website Hosting by HamaraShehar.com