infor.com
concierge
infor u
developer portal
documentation central
customer center
Posts
Categories
Groups
ERPs
CSD
FSM/HRT
LN
M3
Syteline/ CSI
Hubs
Developer
Healthcare
Hospitality
Public Sector
Onboarding
Release Center
CloudSuites
Aerospace & Defense (LN)
Automotive (LN)
Chemicals (M3)
Corporate (FSM/HRT)
Distribution (Sx.e/CSD)
Distribution Enterprise (M3)
Engineering & Construction (LN)
Fashion (M3)
Food & Beverage (M3)
Healthcare (FSM/HRT)
Industrial (Syteline/CSI)
Industrial Enterprise (LN)
Manufacturing (M3)
Public Sector (FSM/HRT)
Solutions
Supply Chain Management (SCM)
Human Capital Management (HCM)
Events
Groups
User Groups
Your Groups
About
Email Community Support
Infor News
Migrated Forums
Home
Clovertech
Clovertech Archive
Read Only Archives
Cloverleaf
Cloverleaf
Sqlite - locked database
System
Originally posted by David Harrison
I have a bi-directional ordercomms interface and I
Find more posts tagged with
Clovertech
Comments
david_barr
You could probably use "catch".
jcobane1
You can use 'catch' along with a 'while' loop to keep trying until the DB is available; i.e.
set retcd 1
while {$retcd} {
System
Originally posted by David Harrison
I've managed to find some information on the Sqlite website
http://www.sqlite.org/tclsqlite.html#busy
It suggests setting a timeout to wait a while until the db is hopefully unlocked or using the 'busy' method but it doesn't give any examples. Is this where the catch command comes in?
Max Drown
Right. In James' example above, the script will loop until the sql statement returns 1 (i.e., it ran successfully).
System
Originally posted by David Harrison
I'll run with that. Thanks
Jim Kosloskey
It might be prudent to put some limit so that you do not end up in that loop endlessly (that would not be good).
Of course then you need to determine what constitutes a prudent, useful limit.
System
Originally posted by David Harrison
That did occur to me so instead I've put in the line 'db timeout 2000' which, according to the documentation, should retry for 2 seconds during which time hopefully the database should no longer be locked. It seems the safer option as it's a live ordercomms interface.
Max Drown
David, how has this been working for you since you made your change?
System
Originally posted by David Harrison
Max,
It's worked ok as I haven't had any 'database locked' errors with the code I've implemented it in. I have had the problem arise with other procs so you've prompted me to make the changes elsewhere.
Thanks,
Dave