Paradox Community

Items in comp.databases.paradox

Subject:Re: Paradox Answer Table
Date:Thu, 11 Feb 2021 08:31:27 -0600
From:Mark Bannister <markRemove@THISinjection-moldings.com>
Newsgroups:comp.databases.paradox
On 2/10/2021 4:18 PM, David George wrote:
> Can you change the location of the answer table?
> 

Not without object pal.  You can run a query with the executeQBE command 
and set location and name of answer table or into a tcurosr.

var
	myq query
endvar
myq = Query

:Myalias:mytable.DB | ID     |
                     | check  |


EndQuery
myq.executeqbe(":myalias:myanswertable.db")

To get the syntax for your query, create it in the ui and save it then 
open the qbe file in a text editor and cut/paste.

 From the help:

executeQBE method/procedure image\example.gif
Executes a query by example (QBE).

Syntax
1. (Method)
executeQBE ( [ { const ansTbl String |
var ansTbl Table |
var ansTbl TCursor } ] ) Logical

2. (Procedure)
executeQBE ( var db Database, var qVar Query
[ , { const ansTbl String |
var ansTbl Table |
var ansTbl TCursor } ] ) Logical

Description
executeQBE executes the query assigned to a Query variable and writes 
the results to :PRIV:ANSWER.DB or to the table specified in ansTbl. You 
can assign a query to a Query variable using a query statement. Create a 
query statement by calling readfromFile or readfromString or by building 
it with appendTable, appendRow, or setCriteria.

Syntax 1 calls executeQBE as a method. You can write the query result to 
ansTbl where ansTbl is a table name, a Table variable, or a TCursor. If 
ansTbl is not specified, executeQBE writes the results to ANSWER.DB in 
the private directory.

Syntax 2 calls executeQBE as a procedure. Specify a Database variable in 
db and a Query variable in qVar. You can write the query result to 
ansTbl where ansTbl is a table name, a Table variable, or a TCursor. If 
ansTbl is not specified, executeQBE writes the results to ANSWER.DB in 
the private directory.

The following notes apply to both syntaxes:

If you specify the table name as a string and don't include a file 
extension, ansTbl defaults to specify a Paradox.

If you specify ansTbl as a Table variable, ansTbl must be assigned and 
valid.

If you specify ansTbl as a TCursor, the results are stored in memory only.

If executeQBE is successful (ansTbl or ANSWER.DB is created)this method 
returns True; otherwise it returns False. executeQBE returns True even 
if the resulting table is empty.

Related Topics

-- 
Mark Bannister



Copyright © 2004 thedbcommunity.com