Problem with multiple sequential queries in script

Problem with multiple sequential queries in script

Post by Linda » Fri, 14 Dec 2001 12:37:47



I'm struggling to produce a script (PXWIN8) that has multiple queries
that must be performed in sequence.

It works fine until it tries to run a query on a table that was used
as output from the previous query, then it gags. Any ideas how to
solve this?

Thanks,
Linda

 
 
 

Problem with multiple sequential queries in script

Post by newJavaG » Fri, 14 Dec 2001 14:12:54


I assume you've tried a breakpoint in the code to see where it is
faltering. Are you releasing the newly created tables in your code?
Some example of the code that is failing would be helpful.

 
 
 

Problem with multiple sequential queries in script

Post by send reply to excite.co » Fri, 21 Dec 2001 07:22:44



Quote:> I'm struggling to produce a script (PXWIN8) that has multiple queries
> that must be performed in sequence.

> It works fine until it tries to run a query on a table that was used
> as output from the previous query, then it gags. Any ideas how to
> solve this?

Don't use an ANSWER table to generate another ANSWER may
help... Use unique table names at every step also helps debugging.

--KC

 
 
 

Problem with multiple sequential queries in script

Post by jblac » Fri, 21 Dec 2001 10:54:29


I don't know if this will help but if you have tried other things and
they did not work here is a suggestion. Give the computer time to write
query results  to disk. Try inserting the command Sleep(1000), for
example, in your code, before the query that chokes your program. You
choose the place and duration as necessary. Hope this helps. Just a
thought anyways, good luck.

> I'm struggling to produce a script (PXWIN8) that has multiple queries
> that must be performed in sequence.

> It works fine until it tries to run a query on a table that was used
> as output from the previous query, then it gags. Any ideas how to
> solve this?

> Thanks,
> Linda

 
 
 

Problem with multiple sequential queries in script

Post by Joseph Misk » Fri, 21 Dec 2001 23:22:42


". . . then it gags."  What does this mean?  We can't provide help if we
don't know the problem.
--
Joseph Misko
Just my format("E" + chr(36) + "L1,W.2", (number(chr(45) + chr(50)) / 100))
--


Quote:> I'm struggling to produce a script (PXWIN8) that has multiple queries
> that must be performed in sequence.

> It works fine until it tries to run a query on a table that was used
> as output from the previous query, then it gags. Any ideas how to
> solve this?

> Thanks,
> Linda

 
 
 

Problem with multiple sequential queries in script

Post by RPrenPho » Sat, 22 Dec 2001 08:16:17


I think querying to an answer from an answer table should work. Be sure you use
a different query variable for each query and that the answer table is not
open.

Quote:>> I'm struggling to produce a script (PXWIN8) that has multiple queries
>> that must be performed in sequence.

>> It works fine until it tries to run a query on a table that was used
>> as output from the previous query, then it gags. Any ideas how to
>> solve this?

Randy Prentice
 
 
 

Problem with multiple sequential queries in script

Post by Stev » Sat, 22 Dec 2001 12:29:45


I would simply add that if Paradox wasn't able to perform multiple
sequential queries, I would be out business.  My application, is in
daily use in over a dozen manufacturing plants, and many, many
pushbuttons run use sequential queries to generate the final
underlying table for reports and forms.  I have never had a problem.
I also generally don't bother to change the query variable from query
to query.  Works every time.  Works in Versions 7,8,9, & 10.

Steve White

 
 
 

Problem with multiple sequential queries in script

Post by Sundial Service » Sat, 22 Dec 2001 12:32:53


Umm, it's called ReportRabbit-II .. you could build such a thing
yourself too, but this is what I've done...

For _all reporting tasks in any of my programs, and many menu-commands
too, I use a table driven sequencer where "QUERY" is merely another
opcode.  The typical sequence for a report is:
        CREATE  the tables needed
        DIALOG  to display an input form to obtain parameters
        QUERY  
        QUERY  
        ...
        IFEMPTY :PRIV:ANSWER, There are no results to display!
        SORT
        PINDEX  make a primary index for the data model
        REPORT  run the report
        END

One system I built had, at one time, over 100 different report sequences
and one compact bit of sequencer-code (ReportRabbit) ran them all.


> I think querying to an answer from an answer table should work. Be sure you use
> a different query variable for each query and that the answer table is not
> open.

> >> I'm struggling to produce a script (PXWIN8) that has multiple queries
> >> that must be performed in sequence.

> >> It works fine until it tries to run a query on a table that was used
> >> as output from the previous query, then it gags. Any ideas how to
> >> solve this?

> Randy Prentice

--
----------------------------------------------------------------
Sundial Services :: Scottsdale, AZ (USA) :: (480) 946-8259

Quote:> Fast(!), automatic table-repair with two clicks of the mouse!
> ChimneySweep(R):  Release 4.0 is here!!
> http://www.sundialservices.com/products/chimneysweep

 
 
 

Problem with multiple sequential queries in script

Post by Linda McGarr » Sat, 22 Dec 2001 13:46:14


Quote:> I assume you've tried a breakpoint in the code to see where it is
> faltering. Are you releasing the newly created tables in your code?
> Some example of the code that is failing would be helpful.

Actually it fails because the table is open and I can't find a way to
"release the newly created table". Is there any way to release the variable?

I came to the conclusion that because the (many) queries are still "open"
and the table is still "open" it behaves in the same manner as interactive
Paradox, i.e. it won't let you run a query on table that is open in the
workspace. The trick is that I can't find a way to "close" the table or
queries so that I can continue.

This comes about because I need to add data to a single table that is reused
in each query. The sad thing is that I can happily do this in the DOS
version!

thanks for the help,
linda mc

 
 
 

Problem with multiple sequential queries in script

Post by Joseph Misk » Sat, 22 Dec 2001 16:53:07


If you execute a query in a script, the table it produces should not be
open.  You are using executeQBE or executeSQL?  It would be helpful if you
post a segment of code or provide an error.  Otherwise, we are shooting in
the dark.  If you run a query from ObjectPAL, the answer table should not be
open unless you explicitly opened it.
--
Joseph Misko
Just my format("E" + chr(36) + "L1,W.2", (number(chr(45) + chr(50)) / 100))
--


Quote:> > I assume you've tried a breakpoint in the code to see where it is
> > faltering. Are you releasing the newly created tables in your code?
> > Some example of the code that is failing would be helpful.

> Actually it fails because the table is open and I can't find a way to
> "release the newly created table". Is there any way to release the
variable?

> I came to the conclusion that because the (many) queries are still "open"
> and the table is still "open" it behaves in the same manner as interactive
> Paradox, i.e. it won't let you run a query on table that is open in the
> workspace. The trick is that I can't find a way to "close" the table or
> queries so that I can continue.

> This comes about because I need to add data to a single table that is
reused
> in each query. The sad thing is that I can happily do this in the DOS
> version!

> thanks for the help,
> linda mc

 
 
 

Problem with multiple sequential queries in script

Post by RPrenPho » Sun, 23 Dec 2001 01:16:51


Quote:>Actually it fails because the table is open and I can't find a way to
>"release the newly created table". Is there any way to release the variable?

I remember reading about a BDE bug on the Borland site concerning table open
problems like you are having and in fact, I recall running into that problem
myself. Was able to deal with it but unfortunately can't remember exactly what
I did.

Pasted queries affect the paradox / BDE environment differently than code
queries. Sorry I can't be more specific.

If using pasted in queries, try using code line queries instead. Like
qvar.appendtable...
qvar.setcriteria...  

Also, things can get ugly if querying tables with very long keyed alpha fields.
Review the table structures.

Good luck.

Randy Prentice

 
 
 

Problem with multiple sequential queries in script

Post by Bertil Isber » Sun, 23 Dec 2001 06:18:33


Linda

Hera are some problems with the query type in ObejctPAL

FIXED IN P9 SP1
When query.enumFieldStruct() is used, the table specified in the query will
not be released in a proper way, not even when the form is closed . Try to
Restructure the table and you'll get the message: Table in Use.

FIXED IN P7 Win95
Whenever I delete a set of records from within a form, using a delete query,
PDox permanently leaves a table lock on that table. No other user will then
have write access to that table. As soon as the first user logs out, the
lock goes away.

This behavior is absolutely reproducible and happens on more than one delete
query.

My comment: Description is too simple. More was needed for the problem to
occur.

STILL OPEN
Query.isQueryValid() leaves a lock on the tables used in the query.

STILL OPEN
When q.setAnswerFieldOrder() is applied to a query variable, the Alias used
in the Query will stay open afterwards. Alias Manager will report  Database
is open and Cannot be modified.

--
Bertil Isberg CTECH
read  the newsgroup:  corel.wpoffice.paradox-faq
for Frequently Asked Questions
---------------------------------------------------

 
 
 

Problem with multiple sequential queries in script

Post by Jean Friedber » Wed, 26 Dec 2001 06:49:09


Same here.  This is one of the most robust, reliable features of paradox.

Jean Friedberg


Quote:> I would simply add that if Paradox wasn't able to perform multiple
> sequential queries, I would be out business.  My application, is in
> daily use in over a dozen manufacturing plants, and many, many
> pushbuttons run use sequential queries to generate the final
> underlying table for reports and forms.  I have never had a problem.
> I also generally don't bother to change the query variable from query
> to query.  Works every time.  Works in Versions 7,8,9, & 10.

> Steve White

 
 
 

1. Collective Time of executing multiple queries in parallel and sequential

Hi All,

Pls. do forgive me if I am posting in the wrong forum. Actually I am
working on an application which requires to perform a large number of
SELECT SQL queries on oracle server. The number of queries to be
performed is in thousands. I want to know if I execute multiple
queries on an oracle server using diffrent connections. Is this
strategy faster than executing the queries one by one sequentially.
Does practically oracle which is installed with normal options
provides some more speed in case of multiple connections. Or it still
handles all the queries one by one. And the collective time of
exceuting queries from multiple connections comes equal to that of
executing the queries one by one.

Regards
Muhammad Ali

2. best database

3. Problem with Access 97/ODBC 2.04 with multiple sequential file linkings

4. OR, Portland / Oracle Applications Specialist (RECRUITER)

5. parallel query or sequential query

6. How to drop Datafile from Tablespace?

7. Query Analyzer - Scripting Multiple Tables

8. #tabdestroy problem ?

9. dropping multiple non-sequential columns

10. Script for finding record numbers in a sequential range

11. Multiple database - multiple query - multiple server

12. VFP6: Program Control of Multiple Sequential Forms?

13. converting sequential to line sequential