General information
Category:
Databases,Tables, Views, Indexing and SQL syntax
>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
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only