Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to requery my SQL grid
Message
 
 
À
03/02/2011 13:43:13
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Network:
Windows XP
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01498606
Message ID:
01498616
Vues:
55
That's fantastic Tore, many thanks for sharing.

Tried it & it works a treat

Long live the Fox

>The "safe select" method is the safe method to avoid rebuilding the grid. Since you never change the controlsource, thus no need to regenerate. Try it, it's an extremely helpful solution.
>
>It's quite easy.

    >
  1. Select the wanted data into a dummy cursor

  2. >
  3. Select the work are where the cursor that drives the grid is

  4. >
  5. Zap it to remove all records

  6. >
  7. Append new data from the temp cursor

  8. >
  9. Refresh the grid

>
>
>
>>Hi Tore
>>
>>Am I missing something? What is the "safe select" method, I was under the impression that if you zap the file that is the row source that rips the rug from under the grid, and the grid goes blank?
>>
>>>By using the "safe select" method
>>>select cname,type,desc,date,operator,startfinish,transid  from wipdata!logfile,operators into cursor tmplog where jobno=wipdata.jobno;
>>>and operator=operators.nempno order by date into cursor CurTemp
>>>Select Tmplog && Cursor that drives the grid
>>>Zap
>>>Append from dbf('CurTemp')
>>>yourgrid.refresh()
>>>NB! Make sure to add the keyword Readwrite to the select that populates the grid, or you can't zap it.
>>>
>>>>I have a grid on my form, it's row source is a SQL command that create
>>>>
>>>>
>>>>select cname,type,desc,date,operator,startfinish,transid  from wipdata!logfile,operators into cursor tmplog where jobno=wipdata.jobno
>>>> and operator=operators.nempno order by date
>>>>
>>>>
>>>>How do I get the SQL command to refire & regenerate the data for my grid?
>>>>
>>>>Many thanks
Rob
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform