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: GetSQLSelect() and SetSQLSelect()
Next Lesson: The DW Syntax Tool

Modify() Function

We've already seen how to use Modify() function to change most of the attributes of a DataWindow, and in the same way we can use it to change the SQL statements. The attribute you need to modify, in order to change the SQL statement, is table.select. For example:
String lArg1, lResult
lArg1 = "datawindow.table.select='select product_no, " + &
        "product_description," + " product_balance from "+&
        "product_master where product_balance < " + &
        "product_reorder_leval'"
lResult = dwc_1.Modify( lArg1)
If lResult = "" Then
   dwc_1.Retrieve()
Else
   MessageBox( "Error in changing the SQL statement",lResult)
   Return -1
End If

When Modify() is used, it doesn't check SQL statement against the database; this makes it faster, but obviously prone to errors.

We would recommend that you thoroughly test any SQL statements associated with this function.
HomePrevious Lesson: GetSQLSelect() and SetSQLSelect()
Next Lesson: The DW Syntax Tool

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