Paradox Community

Items in comp.databases.paradox

Subject:Re: Paradox Answer Table -Not without object pal- yes u can?
Date:15 Feb 2021 20:13:37 -0400
From:"Kevin Zawicki" <numberjack@wi.rr.com>
Newsgroups:comp.databases.paradox


>
Not without object pal.
<

You can in objectPal, but also without it...



Open the query in design and from menu:
Query - Properties

On the Answer Tab you can manually adjust the location and table name answer
for that query.

You save the QBE. reopen and see that QBE answer location changed. (Also
open the QBE in notepad).

it will save in the QBE format
Query
ANSWER: C:\ANSWER2.DB

MyTable.DB | Field1 | 
           | Check  | 

EndQuery


--------
also see setAnswerName

var
  qVar  Query
  AnsTblName String
endVar

qVar.setAnswerName(AnsTblName)
qVar.executeqbe()


Note I have seen setAnswerName method cause cause Paradox to crash or through
fatal error.



Mark Bannister <markRemove@THISinjection-moldings.com> wrote:
>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