After testing both commands I get the following error:

error "sqlite3: unknown option: -cmd
Use -help for a list of options." number 1




On Thu, Sep 27, 2012 at 10:07 AM, Black, Michael (IS) <
michael.bla...@ngc.com> wrote:

> The command does need to be in quotes if it's more than one word.  sqilte3
> expects 1 argument for the command.
>
> I'm not familiar with applescript but I assume you have to escape quotes
> to make them actually appear in the output.
>
> 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 of John [sql...@johneday.com]
> Sent: Thursday, September 27, 2012 9:02 AM
> To: General Discussion 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 \".timeout 2\"  " & databasePath &
> " \"select * from "& table1 & ";\""
> or can I simply use ?
> set xxx to do shell script "sqlite3 -cmd .timeout 2 " & databasePath & "
> \"select * from " & table1 & ";\""
>
> Thanks again for revealing the (apparent) -cmd switch secret.
>
>
> On Thu, Sep 27, 2012 at 9:44 AM, Black, Michael (IS) <
> michael.bla...@ngc.com
> > wrote:
>
> > sqlite3 -help
> >
> > The sqlite3 shell page doesn't explain any switches...couldn't find
> > another page about it. Anybody???
> >
> > And you're right on timeout -- it's in milliseconds.
> >
> >
> > 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 of John [sql...@johneday.com]
> > Sent: Thursday, September 27, 2012 8:39 AM
> > To: General Discussion of SQLite Database
> > Subject: EXT :Re: [sqlite] Sending 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.bla...@ngc.com
> > > wrote:
> >
> > > 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 Information Systems
> > >
> > > ________________________________________
> > > From: sqlite-users-boun...@sqlite.org [sqlite-users-boun...@sqlite.org
> ]
> > > on behalf of John [sql...@johneday.com]
> > > Sent: Thursday, September 27, 2012 7:12 AM
> > > To: sqlite-users
> > > Subject: EXT :[sqlite] Sending SQLite3 .timeout command in Command-Line
> > > Mode
> > >
> > > Hi,
> > >
> > > I have several different computers running an AppleScript that queries
> > and
> > > writes to a SQLite3 database located in a shared folder on the network.
> > > Occasionally a "database is locked" error is produced. Is there a way
> of
> > > sending a .timeout command as if I was working from the shell, in
> > > Command-Line Mode? I understand I can write an error handler which will
> > > accomplish the same thing but I am trying to avoid that option.
> > >
> > > property databaseFolder : POSIX path of (path to public folder as
> text) &
> > > "Databases/"
> > > property databaseName : "myDatabase"
> > > property databasePath : quoted form of (databaseFolder & databaseName
> > > astext)
> > > property table1 : "Main"
> > >
> > > set xxx to do shell script "sqlite3 " & databasePath & " \"select *
> > > from "& table1 & ";
> > > \""
> > >
> > > Thanks.
> > > _______________________________________________
> > > sqlite-users mailing list
> > > sqlite-users@sqlite.org
> > > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
> > > _______________________________________________
> > > sqlite-users mailing list
> > > sqlite-users@sqlite.org
> > > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
> > >
> > _______________________________________________
> > sqlite-users mailing list
> > sqlite-users@sqlite.org
> > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
> > _______________________________________________
> > sqlite-users mailing list
> > sqlite-users@sqlite.org
> > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
> >
> _______________________________________________
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
> _______________________________________________
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to