| 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
Using DataStore In Our ApplicationAs you know, we are using a hidden DataWindow control, dw_product_check in the w_product_master window. What for we are using this hidden DataWindow control? We want to check whether the new product the user entered is existing in the database or not. If isn't existing, we are displaying an error. Let's use the DataStore to get the same functionality that we are getting by hidden DataWindow control. Declare an instance variable as follows:
Append the following to the existing script for the window open event:
We are creating an instance of a DataStore object and assigning the DataWindow object to the DataStore object, similar to the way we change the DataWindow object to a DataWindow control. Then we are setting the transaction object. Comment the following script that is related to the hidden DataWindow control.
Comment the following line in the ItemChanged event of dw_product DataWindow control:
Add the following line just below the above line:
Similarly, comment the following line:
Add the following line just below the above line:
A good programmer destroy all the object that (s)he has created. So, let's do the same. Add the following line in the window Close event:
Now, run the application and see whether it's working properly or not.
|
| Copyright © 1996 - 2006 HamaraShehar.com Pvt. Ltd. All Rights Reserved.
Domain Registration, Website Design, Website Hosting by HamaraShehar.com |