Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to refresh screen w/ new val as other user updates field
Message
From
02/12/2002 19:04:02
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
How to refresh screen w/ new val as other user updates field
Miscellaneous
Thread ID:
00728837
Message ID:
00728837
Views:
58
I used SQLEXEC to give me a cursor, & used CURSORSETPROP to make the cursor updatable. Currently using VFP database, with possibility to convert to SQL in the future. User opens up a form class that displays a record, with command buttons to go to NEXT or PREVIOUS record.

Currently, this is how I set up one of my text field:
.controlSource=cMyTable.refno

As another user updates the original table (myTable), I’d like have all users’ screen to refresh with the new updated value(s). What do I need to change to be able to do so? (example: if user A changes refno from 12 to 146, then I’d like user B to see 146 instead of 12 as user B’s screen refreshes – maybe as he goes to the next record & gets back to it).


lcConnStr="DRIVER={Microsoft Visual FoxPro Driver};" + ;
"SourceDB=c:\projects\myData.dbc;SourceType=DBC;UID=;PWD=;"

THIS.lnHandle=SQLSTRINGCONNECT(lcConnStr)

IF THIS.lnHandle>0
lSuccessMyTable=SQLEXEC(THIS.lnHandle,"SELECT * FROM myTable","cMyTable")
IF lSuccessMyTable=1
SET MULTILOCKS ON
CURSORSETPROP('Buffering',5,'cMyTable')
CURSORSETPROP('TABLES','myTable','cMyTable')
CURSORSETPROP('UPDATABLEFIELDLIST','refno,budgetcode','cMyTable')
CURSORSETPROP('KeyFieldList','refno','cMyTable')
CURSORSETPROP('UpdateNameList','refno myTable.RefNo,budgetcode myTable.budgetcode','cMyTable')
CURSORSETPROP('FetchMemo',.T.,'cMyTable')
CURSORSETPROP('SendUpdates',.T.,'cMyTable')
ENDIF
ENDIF

TABLEUPDATE(0,.F.)

Thank you all!
Next
Reply
Map
View

Click here to load this message in the networking platform