Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Private data sessions and transaction
Message
From
14/05/1998 13:59:17
 
 
To
13/05/1998 01:39:51
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00098873
Message ID:
00099516
Views:
33
>>Greetings again comrades -
>>
>>Background: I have a private data session in my form, but shockingly enough <g> have bombed out a few times in the middle of something. I'd tried to cancel the debugger, cancel the form, and fix the problem. Sometimes I could and sometimes I couldn't (many attempts at clear all, close all). It seems I'd often end up with several data sessions and sometimes Unknown data session .
>>
>>Today after one such episode I found that I got a "Data mismatch error" when trying to do an append in a form which had previously worked. After attempting to look at the database I got a message to the effect that this wasn't permitted in the middle of a transaction. It finally dawned on me that some of those datasessions were in the middle of transactions, and I had to go to them and do a rollback to set things right.
>>
>>So here are my questions: 1) How do you close out a private data session when this happens (i.e. is there another way besides what I did)? 2) Since it was a private data session, I don't understand why I'd get that message about transactions unless I was in that data session when I tried that maneuver. 3) Is Transaction not scoped (if that's the correct phrase) to the private datasession?
>>
>>Thank you for any information you can provide,
>>
>>Sylvia
>Sylvia,
>Transactions are not *scoped* to current data session. It's like a read...clear read. In other words, you could "begin transaction" from command line and "end transaction" or "rollback" after running a lot of code. Where stucked do a rollback. But for the moment I would suggest to keep the transaction in a method where much code is not called. Think this scenario :
Begin transaction
>* Some code here
>* Error occurs and you cancel to fix
>* In second pass again error is not fixed and you cancel again
>* Another level of transaction has begun
>* Now the error is fixed but "end transaction" only ends the last one (3rd).
Cetin

Cetin -

Thanks once again. If I understand you correctly, I should just type rollback until I can't rollback no more, no more;) (this is bad grammar, but a pun on an American song whose name I can't remember) But how do I get rid of all these data session hanging around (or perhaps what you're saying is clean up after each session and I won't have this trouble?)

Sylvia

P.S. Unrelated side note - I've been watching a program about Alexander the Great and they showed Turkey (as one of the many countries he mowed through). You have some pretty scenery!
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform