Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
CURSORTOXML call causes controls to loose value.
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Database:
Visual FoxPro
Miscellaneous
Thread ID:
00994125
Message ID:
00994134
Views:
16
Sergey;

Thanks for the tip. In this case there is only one record, after the CURSORTOXML it reports RECCONT() still 1, but simply by issuing a GO TOP or GOTO 1 solves the problem.

I would of never speculated that i was not on this record.

Thanks again


>The Cursortoxml() moves record pointer to EOF. Try to restore it.
lnrecno = RECNO()
>Cursortoxml('myCursor','lcCursorInfo',1,8,0,'1','')
>IF BETWEEN(lnRecno, 1, RECCOUNT())
>  GOTO (lnRecno)
>ENDIF
>
>
>
>>FormA (private datasession) contains a pageframe with different controls on each page that have control source values of a cursor "myCursor".
>>
>>The intent is to send the current values of this cursor to another FormB (private datasession) by passing this XML doing the following:
>>
>>Cursortoxml('myCursor','lcCursorInfo',1,8,0,'1','')
>>
>>Do From FormB with lcCursorInfo
>>
>>Form B receives the XML and processes correctly.
>>
>>However, when Form get the focus again, the controls on the pageframe pages seem to loose their values. However, the cursor still has its correct values.
>>
>>
>>If I do the following:
>>
>>
>>Select * from myCursor into cursor myDuplicate
>>
>>Cursortoxml('myDuplicate','lcCursorInfo',1,8,0,'1','')
>>
>>Do From FormB with lcCursorInfo
>>
>>everything is fine and returning focus to Form A is okay as well.
>>
>>I am puzzled as to why the first case gives a problem.
>>
>>Thanks in advance
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform