Error DBFNTX/1022 Lock required
Moderator: Rathinagiri
Error DBFNTX/1022 Lock required
Hello everybody
I have 2 browse that pointing to the same DBF in this way
USE FCASSA new SHARED Alias FU
set index to fcassastagx1, fcassadatx1
set filter to AllTrim(FU->TipoMov) = "U"
FU->(DbGoTop())
USE FCASSA new SHARED Alias FE
set index to fcassastagx1, fcassadatx1
set filter to AllTrim(FE->TipoMov) = "E"
FE->(DbGoTop())
@ 60, 20 BROWSE Br_cassain ;
OF CDL2A ;
WIDTH 610 ;
HEIGHT 700 ;
FONT "calibri" ;
SIZE 11 ;
BOLD ;
BACKCOLOR VERDE ;
FONTCOLOR WHITE ;
HEADERS { "DESCRIZIONE", "DATA", "IMPORTO" } ;
WIDTHS { 400, 90, 100 } ;
WORKAREA FE ;
FIELDS { "descr", "datamov", "importo" } ;
ON DBLCLICK EDIT("E");
ON CHANGE LOADDATA("E")
@ 60, 1250 BROWSE Br_cassaout ;
OF CDL2A ;
WIDTH 610 ;
HEIGHT 700 ;
FONT "calibri" ;
SIZE 11 ;
BOLD ;
BACKCOLOR ROSSO ;
FONTCOLOR WHITE ;
HEADERS { "DESCRIZIONE", "DATA", "IMPORTO" } ;
WIDTHS { 400, 90, 100 } ;
WORKAREA FU ;
FIELDS { "descr", "datamov", "importo" } ;
ON DBLCLICK EDIT("U");
ON CHANGE LOADDATA("U")
When I try to update one of them, "Error DBFNTX/1010 Lock required" occurred
How can I solve the problem?
Thanls
Carlo
I have 2 browse that pointing to the same DBF in this way
USE FCASSA new SHARED Alias FU
set index to fcassastagx1, fcassadatx1
set filter to AllTrim(FU->TipoMov) = "U"
FU->(DbGoTop())
USE FCASSA new SHARED Alias FE
set index to fcassastagx1, fcassadatx1
set filter to AllTrim(FE->TipoMov) = "E"
FE->(DbGoTop())
@ 60, 20 BROWSE Br_cassain ;
OF CDL2A ;
WIDTH 610 ;
HEIGHT 700 ;
FONT "calibri" ;
SIZE 11 ;
BOLD ;
BACKCOLOR VERDE ;
FONTCOLOR WHITE ;
HEADERS { "DESCRIZIONE", "DATA", "IMPORTO" } ;
WIDTHS { 400, 90, 100 } ;
WORKAREA FE ;
FIELDS { "descr", "datamov", "importo" } ;
ON DBLCLICK EDIT("E");
ON CHANGE LOADDATA("E")
@ 60, 1250 BROWSE Br_cassaout ;
OF CDL2A ;
WIDTH 610 ;
HEIGHT 700 ;
FONT "calibri" ;
SIZE 11 ;
BOLD ;
BACKCOLOR ROSSO ;
FONTCOLOR WHITE ;
HEADERS { "DESCRIZIONE", "DATA", "IMPORTO" } ;
WIDTHS { 400, 90, 100 } ;
WORKAREA FU ;
FIELDS { "descr", "datamov", "importo" } ;
ON DBLCLICK EDIT("U");
ON CHANGE LOADDATA("U")
When I try to update one of them, "Error DBFNTX/1010 Lock required" occurred
How can I solve the problem?
Thanls
Carlo
Last edited by carlazza on Sat Mar 12, 2022 8:33 am, edited 1 time in total.
- serge_girard
- Posts: 3420
- Joined: Sun Nov 25, 2012 2:44 pm
- DBs Used: 1 MySQL - MariaDB
2 DBF - Location: Belgium
- Contact:
Re: Error DBFNTX/1010 Lock required
Carlo TRY:
USE FCASSA new EXCL Alias FU (or the other)
Serge
USE FCASSA new EXCL Alias FU (or the other)
Serge
There's nothing you can do that can't be done...
Re: Error DBFNTX/1010 Lock required
Hi Serge
sorry but doesn't work
"workarea not in use" is the new error
sorry but doesn't work
"workarea not in use" is the new error
- serge_girard
- Posts: 3420
- Joined: Sun Nov 25, 2012 2:44 pm
- DBs Used: 1 MySQL - MariaDB
2 DBF - Location: Belgium
- Contact:
Re: Error DBFNTX/1022 Lock required
I once experienced the same. It is probably the ALIAS name.
I will try to find how I got it solved backed then...
Serge
I will try to find how I got it solved backed then...
Serge
There's nothing you can do that can't be done...
- dragancesu
- Posts: 931
- Joined: Mon Jun 24, 2013 11:53 am
- DBs Used: DBF, MySQL, Oracle
- Location: Subotica, Serbia
Re: Error DBFNTX/1022 Lock required
You use one dbf twice, i see what is different but why? If two or more program use one dbf than is SHARED but when REPLACE/UPDATE must be used LOCK()/UNLOCK(). We don't see your code for EDIT/UPDATEUSE FCASSA new SHARED Alias FU
set index to fcassastagx1, fcassadatx1
set filter to AllTrim(FU->TipoMov) = "U"
FU->(DbGoTop())
USE FCASSA new SHARED Alias FE
set index to fcassastagx1, fcassadatx1
set filter to AllTrim(FE->TipoMov) = "E"
FE->(DbGoTop())
Re: Error DBFNTX/1022 Lock required
IF err==0dragancesu wrote: ↑Sat Mar 12, 2022 10:16 amYou use one dbf twice, i see what is different but why? If two or more program use one dbf than is SHARED but when REPLACE/UPDATE must be used LOCK()/UNLOCK(). We don't see your code for EDIT/UPDATEUSE FCASSA new SHARED Alias FU
set index to fcassastagx1, fcassadatx1
set filter to AllTrim(FU->TipoMov) = "U"
FU->(DbGoTop())
USE FCASSA new SHARED Alias FE
set index to fcassastagx1, fcassadatx1
set filter to AllTrim(FE->TipoMov) = "E"
FE->(DbGoTop())
IF from == "NEW"
FU->(dbAppend())
ELSE
FU->(dbGoTo ( CDL2A.Br_cassaout.Value ))
ENDIF
FU->FIELD1 := XXX
FU->FIELD2 := XXX
FU->FIELD3 := XXX
FU->FIELD4 := XXX
CDL2A.Br_cassaout.Refresh
dbCommitAll()
ENDIF
RETURN
- SALINETAS24
- Posts: 667
- Joined: Tue Feb 27, 2018 3:06 am
- DBs Used: DBF
- Contact:
Re: Error DBFNTX/1022 Lock required
Has probado con LOCK..???
Como dijo el gran pensador Hommer Simpson..., - En este mundo solo hay 3 tipos de personas, los que saben contar y los que no. 
Re: Error DBFNTX/1022 Lock required
I wrote this post just to ask how to fix the lock problem
- dragancesu
- Posts: 931
- Joined: Mon Jun 24, 2013 11:53 am
- DBs Used: DBF, MySQL, Oracle
- Location: Subotica, Serbia