Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Using progress bar for sql select accessing multiple tab
Message
 
À
01/02/2006 11:02:49
Adam Hicks
The Ssi Group, Inc.
Mobile, Alabama, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Problèmes
Versions des environnements
Visual FoxPro:
VFP 9
OS:
Windows XP
Database:
Visual FoxPro
Divers
Thread ID:
01092373
Message ID:
01092430
Vues:
19
Adam,

Probably you wish to get the current recn() in the SQL-result cursor. Then it may not work as you expect. Here is an example:
CREATE TABLE c:\y1 (word c(10), rec n(3))
FOR ia=1 TO 10
	INSERT INTO y1 VALUES ("record"+TRANSFORM(ia),ia)
ENDFOR

CREATE TABLE c:\y2 (word c(10), rec n(3))
FOR ia=1 TO 10
	INSERT INTO y2 VALUES ("record"+TRANSFORM(ia), ia)
ENDFOR
FOR ia=1 TO 10
	INSERT INTO y2 VALUES ("record"+TRANSFORM(ia), 10+ia)
ENDFOR

* getting recno in order from 1 to 10
SELECT word,RECNO() from c:\y1 INTO CURSOR tmp1  

* getting recno in order from 1 to 10, and then again from 1 to 10
SELECT y1.word,RECNO() from c:\y1,c:\y2 WHERE y1.word == y2.word INTO CURSOR tmp2
You may find here in the download section several progress bars; probably you will find there what you are looking for.

>Here's the problem I'm having, I've created a class called "progressbar" to use for select statements that take a minute or two to complete in order to display a nicer graphical bar than the default one when SET TALK is ON. When selecting data from just one table it works fine. This is how it works:
>
>pbar = newobject("progressbar")
>pbar.max = reccount('TABLE1')
>pbar.show()
>SELECT * FROM TABLE1 WHERE PBAR.UPDATE(RECNO()) ...
>release pbar
>
>The problem is when I use this statement:
>
>SELECT TABLE1.field, TABLE2.field from TABLE1,TABLE2 ;
>WHERE pbar.update(recno()) AND conditions...
>
>I've tried replacing RECNO() with RECNO('TABLE1') and RECNO('TABLE2')
>Still all that happens is the progress bar pops up, sits there, and then disappears without incrementing with all the records.
>
>How can I get around this? Is there an easier way to replace the default progress bar that Fox Pro uses when SET TALK is ON?
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform