Diese Seite mit anderen teilen ...

Informationen zum Thema:
Forum:
WinDev Forum
Beiträge im Thema:
2
Erster Beitrag:
vor 4 Monaten, 3 Wochen
Letzter Beitrag:
vor 4 Monaten, 3 Wochen
Beteiligte Autoren:
Steven Sitas, Amal Murali

Data Currently Locked by another user Error!!!!

Startbeitrag von Amal Murali am 04.07.2017 06:35

Hello Everyone;

Wish all a great day!!!

I am running over a scenario and kindly requesting help from my fellow Forum Mates. In my project over a process to avoid data during middle of entering something like in a Invoice Billing Window i have set up two nodes- One at starting and other at the end if the chain breaks before reaching the end node i have made some codes to roll back the entire process again back to original state. In all my projects this works perfect but over a mass user project i get back this error. Could anyone help me out with this error. SCREENS attached.

This is the inline code:

HTransactionStart(gsDbConnetion)
WHEN EXCEPTION IN

HTransactionEnd(gsDbConnetion)
DO
//Roll back
HTransactionCancel(gsDbConnetion)
Error("Save has been failed")
END

Antworten:

Hi Amal,
It is really difficult from your post to see what is happening ...

Here is how I GENERALLY do it - when using a HFSQL C/S database:
1.The code is from a window where "Independent HFSQL context" is CHECKED.
This is VERY IMPORTANT

2. Basic type of code ....
p_sErrorMessage is string =""
e_bTransaction is boolean=False
HOnError("*",hErrAll,"")
IF HTransactionStart()=False THEN
p_sErrorMessage="problem starting the transaction ..."
ELSE
// call a procedure to do updates, inserts etc ..
// this procedure returns TRUE or FALSE
e_bTransaction=YourProcedure(...)
IF e_bTransaction=FALSE
p_sErrorMessage="transaction canceled ..."
HTransactionCancel()
ELSE
HTransactionEnd()
END
END

///////////////////////////////////////////////////////////
If your code - that I cannot see - is NOT working in a SPECIFIC client, it could be that a transaction is STILL running or you have a "corrupt transaction" (due to a power failure on the server?). You can check this in your HFSQL control center ...
//////////////////////////////////////////////////////////

Steven Sitas
www.alpha360.biz

von Steven Sitas - am 04.07.2017 10:40
Zur Information:
MySnip.de hat keinen Einfluss auf die Inhalte der Beiträge. Bitte kontaktieren Sie den Administrator des Forums bei Problemen oder Löschforderungen über die Kontaktseite.
Falls die Kontaktaufnahme mit dem Administrator des Forums fehlschlägt, kontaktieren Sie uns bitte über die in unserem Impressum angegebenen Daten.