That's right. No impact between the two users..
Regards
I have not used private datasessions.
When you mention 'global datasession', is that global to all forms for a users or global for all forms for all users? Will calling SQLEXEC(conn,sql,'cursor1') for user1 have any impact on user2?
Hi Patrick,
if your form works in a private datasession (either owned or shared with another form), FAS will save your cursor automatically
if it works in the 'global datasession' (in fact the datasession assigned by FAS to your whole application), you need to add it to wcAliasSave.
I often do this in my app. Pull some data, ask the user something, update the data.
If I adapt this code to a Call back method will the "cursor1" be available in my Call Back method?
If yes, can I create a cursor to make vars available in my Call back methods (instead of storing them to form and setting .wcPropSave) ?
If no, I am in trouble.
SQLEXEC(iConn,"Select var1, var2, var3 from table1","cursor1") IF messagebox("Do something?",36,"") = 6 SQLEXEC(iConn,"Update table1 set var3 = 'xxx' where var1 = ?cursor1.var1") ENDIF
Adding a property to the form is the easiest workaround.
Make sure this property is listed in .wcPropSave
Another FoxInCloud developer, Luc Gilot, is developing a class allowing to save some context variables across multiple modal callbacks.
I let him know this thread
Would it make sense to have an addition optional parameter for wMessgebox()?
thisForm.wMessageBox (CallBack, eMessageText [, nDialogBoxType ][, cTitleBarText][, nTimeout][,oVars])
Then have in the wFormCallBack()
LPARAMETERS luUserChoice, loVars
I am finding when I am moving my code into wFormCallBack methods there are variables initialed earlier in the original procedure that I need access to. Being able to pass an object containing my variables would be nice.
What is the suggested way to store them currently? Adding a property on the form?