PDOX/WIN Including calculated fields in a ObjectPal Query 
Author Message
 PDOX/WIN Including calculated fields in a ObjectPal Query

Hello, could someone tell me how I can include calculated fields in a
ObjectPal query. The syntax is not clear to me and the Borland manuals do
not help much.

This is what I want to do :

sample.db     |    FieldA     |    FieldB              ||
              |    A          | B, calc A * B as Result|

While this can be easily done using File|New|Query - which I can save and
invoke using ObjectPal - I would like to be able to create queries on the fly
during run time. Does ObjectPal allow this?

I appreciate your help.




Sat, 13 Jul 1996 22:08:18 GMT
 PDOX/WIN Including calculated fields in a ObjectPal Query

Use an ObjectPal query variable.  The syntax is more or less query= what you
have written below.  You can use variables within the query by starting
them with ~.  That is, ~B in the query below refers to a variable named B.

|> Hello, could someone tell me how I can include calculated fields in a
|> ObjectPal query. The syntax is not clear to me and the Borland manuals do
|> not help much.
|>
|> This is what I want to do :
|>
|> sample.db     |    FieldA     |    FieldB              ||
|>               |    A          | B, calc A * B as Result|
|>
|> While this can be easily done using File|New|Query - which I can save and
|> invoke using ObjectPal - I would like to be able to create queries on the fly
|> during run time. Does ObjectPal allow this?
|>
|> I appreciate your help.
|>

|>

--
----------------------------------------------------------



Mon, 15 Jul 1996 06:36:34 GMT
 PDOX/WIN Including calculated fields in a ObjectPal Query

Newsgroup: comp.databases.paradox
Organization: South Pacific Information Services Ltd

 >
 > This is what I want to do :
 >
 > sample.db     |    FieldA     |    FieldB              ||
 >               |    A          | B, calc A * B as Result|
 >
 > While this can be easily done using File|New|Query - which I can save and
 > invoke using ObjectPal - I would like to be able to create queries on the
fly
 > during run time. Does ObjectPal allow this?

Sure thing (unchecked code follows, but you'll get the idea):

var myquery endvar

myquery  = Query

    sample.db      |    FieldA     |    FieldB                 |
                   |   _A          | _B, calc _A * _B as Result|

endQuery

myquery.executeQBE()   ; Results go to ANSWER unless specified

Note the underscores -- they are what make your A's and B's "example
elements". Note also the blank lines after QUery and before endQuery
-- they are essential.

cheers,
peter
==============================================================================
             Peter Hyde, South Pacific Information Services Ltd
             New Zealand -- life on the outer edge of the planet



Wed, 17 Jul 1996 05:37:00 GMT
 PDOX/WIN Including calculated fields in a ObjectPal Query

 >
 > This is what I want to do :
 >
 > sample.db     |    FieldA     |    FieldB              ||
 >               |    A          | B, calc A * B as Result|
 >
 > While this can be easily done using File|New|Query - which I can save and
 > invoke using ObjectPal - I would like to be able to create queries on the fly
 > during run time. Does ObjectPal allow this?

Sure thing (unchecked code follows, but you'll get the idea):

var myquery endvar

myquery  = Query

    sample.db      |    FieldA     |    FieldB                 |
                   |   _A          | _B, calc _A * _B as Result|

endQuery

myquery.executeQBE()   ; Results go to ANSWER unless specified

Note the underscores -- they are what make your A's and B's "example
elements". Note also the blank lines after QUery and before endQuery
-- they are essential.

cheers,
peter
==============================================================================
             Peter Hyde, South Pacific Information Services Ltd
             New Zealand -- life on the outer edge of the planet



Wed, 17 Jul 1996 05:37:03 GMT
 
 [ 4 post ] 

 Relevant Pages 

1. PDOX 4.5 WIN - ObjectPal Spreadsheet Export Error

2. Pdox 4.5 Win ObjectPAL help!

3. Printing Forms in Win Pdox from ObjectPAL

4. Exporting Pdox memo fields to ascii - Pdox for Win 4.5

5. pdox 5: report summary fields for calculated fields?

6. Pdox for Win 4.5 Runtime messes Pdox for Win 1.0

7. Calculating in a query using objectpal HELP!!

8. PDOX-WIN; calculating age from dates

9. Calculating calculated fields in 1 query

10. WIN: ObjectPAL Query + Keywords (Repost)

11. WIN: ObjectPal query + keywords

12. Calculated Field Problem. Delphi w/ Pdox 4.5 Table


 
Powered by phpBB® Forum Software