| Hyderabad Jobs | Book Website | ![]() |
I Love Hyderabad | Hyderabad Colleges |
| Home | Business Emails | Hyderabad Classifieds | Contact Us | |
| 7 Wonders of Hyderabad | Web Hosting | Yellow Pages | Our Network | |
Mastering PowerBuilder
Creating the Remote ObjectSelect File > New menu option and double click on Custom Class icon located under Object tab page and select Connection and click OK button. This class has two methods, of_Retrieve() to retrieve products and of_Update() to save changes done to the product. These two functions act on an instance variable ids_product DataStore.
Let us create the DataStore in the Constructor event and initialize it.
Now let's declare the method to retrieve products from the database.
In this function we are basically retrieving data using Retrieve(). Then we are calling GetFullState()introduced in v6.0, retrieves complete DataWindow/DataStore state information such as data buffers and status flags including the DataWindow object about the specified DataWindow into a BLOB object. This function is primarily used in distributed PowerBuilder applications to synchronize DataStore on the server with DataWindow/DataStore on the client side, even though you can use it in normal PowerBuilder applications. Once you have the information in a BLOB object, you can use that BLOB object to set the target DataWindow using SetFullState() function. There are two more interesting functions GetChanges() and SetChanges()that allows you to update a DataWindow. These functions also take a BLOB variable as argument. GetChanges()populates the BLOB object with the changes information and the size is a lot smaller compared to the BLOB returned in the GetFullState(). The following is the code for the of_Update() at ncst_Product_Master.
In the above function first we are applying the changes to the DataStore and then updating the DataStore. Later we are getting the changes into the BLOB variable which is used in the SetChanges()at the client side.
|
| Copyright © 1996 - 2006 HamaraShehar.com Pvt. Ltd. All Rights Reserved.
Domain Registration, Website Design, Website Hosting by HamaraShehar.com |