Re: AppleScript access to databases (was: A bit of philosophy about Database events)
Re: AppleScript access to databases (was: A bit of philosophy about Database events)
- Subject: Re: AppleScript access to databases (was: A bit of philosophy about Database events)
- From: Axel Luttgens <email@hidden>
- Date: Mon, 22 Mar 2010 10:29:36 +0100
Le 22 mars 2010 à 01:01:23, BareFeet a écrit :
> [...]
>
> You can, however, create and access true SQLite database files from AppleScript. The simplest way is to use "do shell script" to use the command line tool "sqlite3".
>
> Here's the code I was using to execute arbitrary SQLite commands and selects.
>
> [...]
> set shellCommand to "echo " & (quoted form of sqlCommand) & " | " & sqlite3Path & space & quoted form of databasePath
> [...]
Hello Tom,
This is just about a detail...
Perhaps would it be more appropriate to make use of:
/usr/bin/sqlite3 <path to db> <sql statements>
instead of:
echo <sql statements> | /usr/bin/sqlite3 <path to db>
It may be expected to be slightly more efficient; one also should avoid the various prompts from an interactive session, as well as the possible transformation of <sql statements> by the echo command.
Axel,
Somewhat OT
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden