Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SQLPassthrough
Message
From
27/01/2004 15:19:14
 
 
To
27/01/2004 14:59:52
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Miscellaneous
Thread ID:
00871070
Message ID:
00871103
Views:
15
>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
Previous
Reply
Map
View

Click here to load this message in the networking platform