| 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
Connecting from Client App to Middle Tier AppIn the client application, i.e., the application located in product.pbl, we have created a connection object, but we haven't coded anything to connect to the middle tier application. Open the application object and declare a global variable as shown below:
In the application Open event, append the following code.
Now, add ncst_product_master instance variable to w_product_master window.
Comment any code that is referring to any DataWindow in the w_product_master Open event and add the following code.
Replace ue_retrieve event code with the following:
In the above code, we are calling of_retrieve() function that is declared in ncst_product_master. You may recall that ncst_product_master is residing in product-server.pbl which will eventually be moved to another machine. However, you have the proxy for ncst_product_master sitting in product-proxy.pbl, which is in your current application library list. Later, we are making using of DataWindow synchronization functions. Replace ue_save event code with the following.
The logic here is similar to ue_retrieve event. Here we are calling ue_update instead of of_retrieve. We are reading the changes into the BLOB variable and sending to the middle-tier object by calling of_update(). Later, we are resetting the status flags for dw_product.
|
| Copyright © 1996 - 2006 HamaraShehar.com Pvt. Ltd. All Rights Reserved.
Domain Registration, Website Design, Website Hosting by HamaraShehar.com |