Link to home
Start Free TrialLog in
Avatar of fmoore0001
fmoore0001

asked on

Refresh a Cursor?

I often open several instances of the same table when I want to relate the table to a parent and be able to move the record pointer freely for a lookup. The problem is that if I append a new record in one cursor  it is not immediately visible in the other cursor for the lookup. Is there a way to have a cursor refresh its data from disc periodically?
SOLUTION
Avatar of Pavel Celba
Pavel Celba
Flag of Czechia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of fmoore0001
fmoore0001

ASKER

Let's see if I can clarify. We're opening the tables via the form's data environment. The tables are all opened with buffering == 5. We do it that way because it allows the user to UNDO changes to the data if necessary.

We have a table called 'Client' which contains all types of client data, some lenders, some borrowers, some payables. In some cases we need lender, borrower and payable data at the same time. We do this by having three cursors in the data environment all based on the same table, 'Client', but with the record pointer on different records in each cursor. If I make a change to the cursor that represents the borrower those changes will not be visible in the cursor that represents the lender until I do a table update on the borrower cursor then close and reopen the lender cursor? Is there no other way to refresh the lender cursor without closing and reopening it?
OK, now we understand changes may be visible after TABLEUPDATE().

BUT it is still not clear how your cursors are created. If they are just different aliases to one table then it should be sufficient to refresh appropriate controls where data are displayed.

If your cursors are created by some query which creates standalone table then you have to recreate such cursors.

Do decide which of above is valid you may issue  LIST STATUS TO FILE YourFile.TXT and look at the file created.

BTW, one more thing is not so clear: Are you using same record of your Client table to store both lender and borrower? I would guess such data should be in different records.
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thanks for the help, guys,   The solution for us was a combination of things.