Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SQLPassthrough
Message
De
27/01/2004 15:19:14
 
 
À
27/01/2004 14:59:52
Steven Dyke
Safran Seats USA
Texas, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Divers
Thread ID:
00871070
Message ID:
00871103
Vues:
16
>Sergey's suggestion worked. Now I have my cursor with all the dm_drawing numbers in it. My form is populated with a different cursor. How will I use the table cursor to find the next record in the all dm_drawing number cursor?

If I understand your situation correctly, you now have two cursors, one with all of the key fields and one with the data that populates a form. If this is the case, the following is how I've done it:
1. Create a control or process for selecting a record from your list of key fields. You can use a search routine or even navigation controls. Either one will do. When you navigate to a new record in the master list or select one from the list through some other process...
2. Set the form's lockscreen property to .T.
3. If the screen controls are bound to the cursor (object.controlsource = Table.field), you must unbind them. This is especially important with grids, otherwise they blank out. If they're not bound, you don't need to do anything.
4.. When you select the desired record, Query your SQL database using the chosen key field in the where clause of the query or as a parameter you pass to the stored procedure that returns the data.
5. When the data is returned, either rebind the cursor to the controls or do something like: object.value = table.field
6. Set the form's lockscreen property to .F.

The server's response should be fast enough, if the table has a supporting index, that this will appear virtually instantaneous.

HTH
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform