Topics

Locking on Read

De Netwerkadviseur BV
 

Hi,

I have a main file with Locking on Modify. 
I have "Link Query" and "Open Read/Share Write" file in record main.

On modify the main file, I got a Multiple Locking on the Linked file.

What is going wrong? I don't need locking while the DBfile is Open in Read mode.

Magic v9.4SP8 and Btrieve v13

Best regards,
André

Mike Bannon
 

Hi André

 

One cause of this would be if the linked file is open in write mode higher up the task tree. If it is, it won’t re-open in read, but use the already opened write instance, hence the lock.

 

HTH

 

Mike Bannon

 

DFLogo1

 

www.dataformation.co.uk

Mobile : 07855 496166

Office : 01524 840100

 

From: main@magicu-l.groups.io [mailto:main@magicu-l.groups.io] On Behalf Of De Netwerkadviseur BV
Sent: 30 January 2020 14:29
To: main@magicu-l.groups.io
Subject: [magicu-l] Locking on Read

 

Hi,

I have a main file with Locking on Modify. 
I have "Link Query" and "Open Read/Share Write" file in record main.

On modify the main file, I got a Multiple Locking on the Linked file.

What is going wrong? I don't need locking while the DBfile is Open in Read mode.

Magic v9.4SP8 and Btrieve v13

Best regards,
André

De Netwerkadviseur BV
 

Hi Mike,

Thanks a lot!! This is exactly what happen.

Because of the Link, there seams a file-lock.
Do you know a way to make a record lock instead of a file lock on "Linked" records? 

Best regards,
André 

Mike Bannon
 

HI André

 

I’m glad I could point you in the right direction. I’m afraid, though, that I don’t know why this should be a file rather than record lock. It may be a Btrieve thing – I work only with SQL-Server.

 

Regards

Mike

 

From: main@magicu-l.groups.io [mailto:main@magicu-l.groups.io] On Behalf Of De Netwerkadviseur BV
Sent: 30 January 2020 15:31
To: main@magicu-l.groups.io
Subject: Re: [magicu-l] Locking on Read

 

Hi Mike,

Thanks a lot!! This is exactly what happen.

Because of the Link, there seams a file-lock.
Do you know a way to make a record lock instead of a file lock on "Linked" records? 

Best regards,
André 

De Netwerkadviseur BV
 

Thanks anyway for helping me out.

Regards,
André

lehoczki.viktor@...
 

Dear All,

Table lock can in 2 case:
1. You have a lot of Records locked so the DBMS Manager switch to table lock instead of record lock.
2. The settings in magic ini is set to Table lock.
Magic.ini
Databases menu
Database prroperty (ALT+ENTER)
Options TAB
Locking = Table

The settings can be:
None, Record, Table, Both

Best regards,

Viktor

Peter Ashworth
 

Hi André

If you need to keep the write mode in the higher task, but want to force the child task not to perform any locking. You can set in task properties, Enhanced tab, Data Management Options group box, Locking strategy=No Lock. The only downside to this is that you cant lock any records in other tables in the current task level either.

I don't see how you are getting the table lock rather then record lock, Normally that only comes into play if you do share=read or share=none.

HTH

Peter

De Netwerkadviseur BV
 

Hi Peter and Viktor,

Thanks for your help. I already solved the problem by making a subtask with the link in it. This way the database is opened and directly closed, so only a very short lock.

Best regards,
André