Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Error 1585 with 2 Datasessions ?
Message
From
19/11/2002 11:40:08
Jason Mesches
Ocean Systems Engineering Corporation
Carlsbad, California, United States
 
General information
Forum:
Visual FoxPro
Category:
The Mere Mortals Framework
Miscellaneous
Thread ID:
00724302
Message ID:
00724354
Views:
27
Marcus,

What buffering are you using on this view? If it's table buffered, are you positive that you're getting a "good" return value (FILE_OK) from your BizObj.Save()? You may want to test the GetFldState(-1) on the view after the save to be sure that everything's been committed.

Another idea is to test your Requery() return value. It should be 1 if it worked, and you may want to verify by browsing it just to be sure that it picked up your saved changes from the other datasession. I'm tempted to say this might be where you'll want to start, because the error seems to indicate that your second data session's view is out of sync with the table.

Hope that helps,
---J

>Hi,
>
>I am struggling with one problem relly long now. Even it ist nor really Mere Mortal related, I place it here because we are working in a MM environment and perhaps another MM user already ran over this:
>
>OK the scenario:
>I habe a Business Objekt loading one view. For several reasons I habe to use this Objekt in 2 differnt Datasessions at one time.
>Before changing data in DataSession2 (DS2), I do save all data in DS1.
>Also I requery() the view before changing data in DS2.
>
>When sending an Tableupdate I get a .F. saying it is the 1585 Error.
>Which means another user has changed the data. Actually I wasn't able to find the one doing the changes I came up with this code for testing:
>
>
>ACTIVATE SCREEN
>SELECT "v_teiausbaubybeweg"
>IF TABLEUPDATE(.T.) = .F.
>   lcGet = GETFLDSTATE(-1)
>   AFIELDS(laField)
>   FOR lnLv = 1 TO 16
>      IF SUBSTR(lcGet,lnLv+1,1) != "1"	
>         ? OLDVAL(laField[lnLv,1])
>         ? curVAL(laField[lnLv,1])
>         ? EVALUATE(laField[lnLv,1])
>         IF OLDVAL(laField[lnLv,1]) != curVAL(laField[lnLv,1])
>          MESSAGEBOX("Got the Error"+laField[lnLv,1])
>         ENDIF
>       ENDIF
>   ENDFOR
>ENDIF
>
>
>Now the surprise:
>The Messagebox never shows up! CurVal and OldVal Buffers are exactly the same, no data is deleted.....
>I have no more ideas ? When I force Tableupdate it works but that can't be the way ?
>
>Is there any known issue with VFP handling the same table or view in 2 Data sessions ??????
>
>BTW: I don't use TableUpdate in BOs, just put out a bit code for testing. I am not Using Executants...
>
>Thanks for every idea on earth
>Marcus
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform