Re: AppleScript access to databases
Re: AppleScript access to databases
- Subject: Re: AppleScript access to databases
- From: BareFeet <email@hidden>
- Date: Mon, 22 Mar 2010 21:32:01 +1100
On 22/03/2010, at 8:29 PM, Axel Luttgens wrote:
>> set shellCommand to "echo " & (quoted form of sqlCommand) & " | " & sqlite3Path & space & quoted form of databasePath
> 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>
Thanks for the feedback.
Unfortunately, no, that won't work all commands. I used to do it that way, but soon found it didn't work for all. I think the problem was with those commands that run over multiple lines.
> It may be expected to be slightly more efficient
I doubt that the speed difference would actually be significant.
> one also should avoid the various prompts from an interactive session
Piping the commands into the sqlite3 command doesn't start an interactive session.
> as well as the possible transformation of <sql statements> by the echo command.
The "quoted form" AppleScript operator seems to take care of that.
Thanks,
Tom
BareFeetWare
--
Comparison of SQLite GUI tools:
http://www.tandb.com.au/sqlite/compare/?ml
_______________________________________________
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