Browse DevX
Sign up for e-mail newsletters from DevX

Tip of the Day
Language: SQL
Expertise: Beginner
May 29, 1997



Building the Right Environment to Support AI, Machine Learning and Deep Learning

OPO 2.0 and mathematic operations

Yesterday I received a description for a reality problem I must represent in my OPO-database application. It concerns the drinking water supply for a city, and the staff of the water company are still working the Excel tables. Their task is to calculate, on the basis of these tables, the quality of the water they supply. The idea they have (and the work for me) is to import/implement these Excel tables (approximately 10 different ones) in the local database of OPO (Personal Oracle Lite), then develop an application that offers the user an interface (several forms) for analyzing the underlying data.

My main task will be to combine different data fields of tables with the help of basic mathematic or statistic operations, e.g. squaring of numbers.

In which way is it possible to implement these operations — perhaps on the basis of basic mathematic operators — in OPO 2.0? Maybe with the help of "methods" ? Can I find this information in your book, or perhaps you have another source of info? Are there any restrictions regarding the use of mathematic/statistic operations in OPO?

What is the easiest way to import Excel tables in "Lite"? I have a choice between Excel files and ASCII files. Which is better?

Oracle Power Objects includes most basic mathematical operations. If squaring numbers is the most complex you will get, you can certainly do it in OPO. You can create user-defined methods to handle the calculation and return a result. If you are going to use a calculation throughout your application, I would suggest defining it at the application level to make referencing it easier.

If you want to do more complex operations, it might be worth your while to create a Dynamic Link Library (DLL) in C, because C routines generally perform complex calculations much faster than any 4GL (like OPO). Once you create your DLL, you can define the functions in the Declarations section of the application and call the function just like any other built-in OPO method.

DevX Pro
Comment and Contribute






(Maximum characters: 1200). You have 1200 characters left.



Thanks for your registration, follow us on our social networks to keep up-to-date