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:
00726037
Views:
21
>>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:
>>
>
>I just tried the following code in one of my projects (using it's database and view):
>
>
>At the second BROWSE, I modified the data. It seemed to work on my system - is there something else happening to your data that my test isn't doing?

I just reread your post, and I see that the error was happening on the second update, so I adjusted my test code (it still worked OK):
LOCAL loDS1 As Session, ;
      loDS2 As Session, ;
      laError[1]

loDS1 = CREATEOBJECT("Session")
SET DATASESSION TO loDS1.DataSessionID
SET EXCLUSIVE OFF
OPEN DATABASE FYW SHARED
USE lv_destinations IN 0 SHARED 
CURSORSETPROP("Buffering", 5)

loDS2 = CREATEOBJECT("Session")
SET DATASESSION TO loDS2.DataSessionID
SET EXCLUSIVE OFF
OPEN DATABASE FYW SHARED
USE lv_destinations IN 0 SHARED
CURSORSETPROP("Buffering", 5)
BROWSE

SET DATASESSION TO loDS1.DataSessionID
BROWSE

IF !TABLEUPDATE(.T., .F., "lv_destinations")
   AERROR(laError)
   MESSAGEBOX("Update failed with " + TRANSFORM(laError[1]) + ": " + laError[2])
ELSE
   MESSAGEBOX("Update complete.")   
   SET DATASESSION TO loDS2.DataSessionId 
   REQUERY("lv_destinations")
   BROWSE
   
   IF !TABLEUPDATE(.T., .F., "lv_destinations")
      AERROR(laError)
      MESSAGEBOX("Update failed with " + TRANSFORM(laError[1]) + ": " + laError[2])
   ELSE
      MESSAGEBOX("Update complete.")
   ENDIF
   
ENDIF   
-Paul

RCS Solutions, Inc.
Blog
Twitter
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform