Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

cursor adapter in VFP 9

Status
Not open for further replies.

AmirMoradi

Programmer
Apr 18, 2017
1
IR
Hi,
I'm trying to use SQL SERVER tables in vfp9 form via cursor adapter.
I have 2 forms, each of them has a grid which is linked to cursor adapter. cursor adapter is linked to a specific table in sqlserver database.
but when i change a record in form-1, it can not be seen updated data in form-2 until we release and run the form-2 again.

can you help me to solve this problem?

Thanks,
Amir
 
No, because remote tables are not DBFs and cursoradpaters get their data at one query time, you have a view on data, but not a live view. CAs are just like a remote view in that aspect.

To see every change of other sessions immediately, you'd need somthing to pull for changes very frequently, and that wouldn't work out nice, it has a cost in network usage.

The classic/legacy VFP way is every session / form looks at the DBF file, but also only at times you skip or change record pointer in any way, or focus a control bound to some DBF field. So that situation also is no live view. If this would be done, you'd just jam the network with reading the same data most of the time, unless there was a change. Neither SQL Server nor DBF files also are knowing whos reading/looking at them at the moment, so new data arriving at a file can't trigger posting that to any client automatically. Even with DBFs its only the clients refreshing themselves, never the servers pushing new data to clients.

That said, you don't have to restart a form fully to requery, You can REQUERY(CA alias). But you have to do it client side, it's not done automatically, there is no connection to SET REFRESH like with a BROWSE window. Besides its just a cursoradapter, not a browseadapter.

Bye, Olaf.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top