I posted this a while ago:
http://sqlite.1065341.n5.nabble.com/Loading-Options-from-the-command-line-binary-td12230.html
It's not very obvious.
John wrote:
Hi,
I have several different computers running an AppleScript that queries and
writes to a SQLite3 database located in a shared folder
I used the following to upgrade SQLite 3 on 10.6.8. I now have version
3.6.12 installed in /usr/bin/ and version 3.7.14 installed in
/usr/local/bin/. Was this the best way to install it?
mkdir ~/tempFolder
cd ~/tempFolder
curl https://www.sqlite.org/sqlite-autoconf-3071400.tar.gz | tar xvz
cd
On Thu, Sep 27, 2012 at 10:15:14AM -0400, John scratched on the wall:
> As you can tell, I don't have much experience with sql. I was going in the
> timeout direction because simply resending the command several seconds
> after the locked error occurred seemed to return the correct value. My plan
The other thing you should do is check the exit status of sqlite3. if not 0
then an error occurred.
Plus parse the output to see if you get any errors -- in specific handle the
errors you know about and show errors that need a handler. So for BUSY and
LOCKED you may loop for a while retrying
ced Analytics Directorate
> > Advanced GEOINT Solutions Operating Unit
> > Northrop Grumman Information Systems
> >
> >
> > From: sqlite-users-boun...@sqlite.org [sqlite-users-boun...@sqlite.org]
> > on behalf of John [s
As you can tell, I don't have much experience with sql. I was going in the
timeout direction because simply resending the command several seconds
after the locked error occurred seemed to return the correct value. My plan
is to implement Michael's suggestion and if the error continues to occur,
of SQLite Database
Subject: EXT :Re: [sqlite] Sending SQLite3 .timeout command in Command-Line Mode
I can't find anything about the -cmd switch outside of the official docs
either!
Does the command need to be escaped as it is in your example
set xxx to do shell script "sqlite3 -cmd \"
On Thu, Sep 27, 2012 at 09:39:31AM -0400, John scratched on the wall:
> Thank you Michael. I can't find anything in the documentation about the
> -cmd switch. Will you point me in the right direction? Also, a 2 second
> timeout would be .timeout 2000 , right?
Do understand that this will not
> Michael D. Black
> Senior Scientist
> Advanced Analytics Directorate
> Advanced GEOINT Solutions Operating Unit
> Northrop Grumman Information Systems
>
>
> From: sqlite-users-boun...@sqlite.org [sqlite-users-boun...@sqlite.org]
> on behalf o
SQLite3 .timeout command in Command-Line Mode
Thank you Michael. I can't find anything in the documentation about the
-cmd switch. Will you point me in the right direction? Also, a 2 second
timeout would be .timeout 2000 , right?
John
On Thu, Sep 27, 2012 at 8:36 AM, Black, Michael (IS) <michael.
Thank you Michael. I can't find anything in the documentation about the
-cmd switch. Will you point me in the right direction? Also, a 2 second
timeout would be .timeout 2000 , right?
John
On Thu, Sep 27, 2012 at 8:36 AM, Black, Michael (IS) wrote:
> Try the -cmd
Try the -cmd switch. Probably the easiest solution.
set xxx to do shell script "sqlite3 -cmd \".timeout 2\" " & databasePath & "
\"select * from "& table1 & ";\""
Michael D. Black
Senior Scientist
Advanced Analytics Directorate
Advanced GEOINT Solutions Operating Unit
Northrop Grumman
12 matches
Mail list logo