Subject: | Re: Paradox Answer Table -Not without object pal- yes u can?
| Date: | Tue, 16 Feb 2021 12:22:08 -0500
| From: | "Steven Green" <greens@diamondsg.com>
| Newsgroups: | comp.databases.paradox
|
> I don't think you can change the default location, by default answer,
> problems, etc. go to PRIV.
yes, you can change the priv on-the-fly.. interactively and in code
--
Steven Green
Myrtle Beach, South Carolina, USA
http://www.OasisTradingPost.com
Collectibles and Memorabilia
Vintage Lego Sets and Parts
- and Paradox support, too
"Kevin Zawicki" wrote in message
news:602b3e00$1@pnews.thedbcommunity.com...
My point is that you can change it on the fly, location and name in code
or interactively.
I don't think you can change the default location, by default answer,
problems,
etc. go to PRIV.
Leslie <"ViaThe List"@NOSPAM.com> wrote:
>You need to set the Answer Table location right up front pretty much
>before you do anything else. Same for setting the net location folder.
>Leslie.
>
>On 16/02/2021 10:13 AM, Kevin Zawicki wrote:
>>>
>> 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
>>>
>>>
>>
>
>--
>This email has been checked for viruses by Avast antivirus software.
>https://www.avast.com/antivirus
>
|