Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Error 1585 with 2 Datasessions ?
Message
General information
Forum:
Visual FoxPro
Category:
The Mere Mortals Framework
Miscellaneous
Thread ID:
00724302
Message ID:
00726247
Views:
17
Paul,

thanks for your try. Actually that is the thing we are doing and I already did put up a scenario like yours (see below) and I can not reproduce the error on this way. But I am really shure that nothing else is happening.
Actually the error is reproducable but in a really complex environment, so I won't be able to strip it down, I already tried.
At the end point I fell over the code I posted in the last mail. I do not understand why it is behaving this way, because when all CurVal() are the same as all OldVal() - I don't think I shoud have a update conflict ?

What do you think ?

Marcus
lcTeiBewegID = "EIN_0S911KT8F"
LOCAL loDS1 As Session, ;
      loDS2 As Session, ;
      laError[1]

loDS1 = CREATEOBJECT("Session")
SET DATASESSION TO loDS1.DataSessionID
OPEN DATABASE ERP_VIEWS
VP_AusTeiBewegID = lcTeiBewegID
SET EXCLUSIVE OFF
USE "lv_teiausbaubybeweg" IN 0 SHARED 
CURSORSETPROP("Buffering", 3)

loDS2 = CREATEOBJECT("Session")
SET DATASESSION TO loDS2.DataSessionID
SET EXCLUSIVE OFF
OPEN DATABASE ERP_VIEWS
VP_AusTeiBewegID = lcTeiBewegID
USE lv_teiausbaubybeweg IN 0 SHARED
CURSORSETPROP("Buffering", 3)

*-- Reproduce 500 Times 
FOR lnLv = 1 TO 500

    *-- DS 2
    SET DATASESSION TO loDS2.DataSessionID
    IF REQUERY("lv_teiausbaubybeweg") != 1
        ASSERT .F. MESSAGE "Requery Error"
        EXIT
    ENDIF

    *-- Do any replace
    REPLACE lv_teiausbaubybeweg.mschtxt_d WITH SYS(2015)
    REPLACE lv_teiausbaubybeweg.mschtxt_e WITH SYS(2015)
    *-- Tableupdate
    IF !TABLEUPDATE(.T., .F., "lv_teiausbaubybeweg")
        AERROR(laError)
        ASSERT .F. MESSAGE "Update failed with " + TRANSFORM(laError[1]) + ": " + laError[2]
    ENDIF  

    *-- And DS 1
    SET DATASESSION TO loDS1.DataSessionID
    IF REQUERY("lv_teiausbaubybeweg") != 1
        ASSERT .F. MESSAGE "Requery Error"
        EXIT
    ENDIF

    *-- Do any replace
    REPLACE lv_teiausbaubybeweg.mschtxt_d WITH SYS(2015)
    *-- Tableupdate
    IF !TABLEUPDATE(.T., .F., "lv_teiausbaubybeweg")
        AERROR(laError)
        ASSERT .F. MESSAGE "Update failed with " + TRANSFORM(laError[1]) + ": " + laError[2]
    ENDIF  
ENDFOR

SET DATASESSION TO loDS1.DataSessionID
CLOSE DATABASES ALL

SET DATASESSION TO loDS2.DataSessionID
CLOSE DATABASES ALL

*-- I never get an error, trying to reproduce this
MESSAGEBOX("Everything went OK!")
CLOSE ALL
	
Marcus Alt
TRIA IT-Consulting GmbH
Working hard | for your success
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform