Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Mysql with ado
Message
 
À
01/02/2005 21:09:28
Maltin Lacsina
Angeles Electric Corporation
Angeles, Philippines
Information générale
Forum:
Visual FoxPro
Catégorie:
Contrôles ActiveX en VFP
Titre:
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP
Database:
MySQL
Divers
Thread ID:
00982938
Message ID:
00983013
Vues:
24
>Is there a way to put a progressbar in my select statement while executing?
>
>When I issued a select statement with 1million record my vfp hangsup (not responding) and when I connect to mysql to server sometimes it hangsup is there away to put some kind of progressbar?
>
>I am using ADO with MySql.

Maltin,
you can set async = .t. You then have to make repeated calls to get the data and count the number of loops. The counter can then be used for the progress bar. You would have to calculate the amount of data received by each loop to get an accurate setting on the bar. This works with ODBC. I have not worked with ADO.
HTH
? 'Set asynchronous to .T.'
masync = .t.
=sqlsetprop(mHandle, 'asynchronous', masync)
*
mCommand = 'select * from db1112.psso ;'
if sqlexec(mHandle, mCommand, 'MYTABLE') < 0
  ? 'ERROR'
endif
*
mcnt = 0
if masync
  do while .t.
   x = sqlexec(mHandle)
   if x > 0
      exit
    endif
   mcnt = mcnt + 1
   ? mcnt   && <-- Feed progress bar with this.
  enddo
endif
*
if used('mytable')
  select mytable
  brow
endif
Beer is proof that God loves man, and wants him to be happy. - Benjamin Franklin
John J. Henn
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform