Re: SQLite Version Problems
Re: SQLite Version Problems
- Subject: Re: SQLite Version Problems
- From: T&B <email@hidden>
- Date: Tue, 30 Jan 2007 23:51:15 +1100
Hi Simon,
I am using SQLite via "Do Shell Script" in an AppleScript application
Is this built using Xcode (aka AppleScript Studio)?
but I have discovered that the version installed as standard with
OS X 10.4.x
which I think is version 3.1.3.
does not support some of the features that I would like to use such
as CAST and also has some bugs in the output mechanism.
Is the "output mechanism bug", to which you're referring, the problem
with CSV output? If so, then yes, it has been fixed as of SQLite
3.3.9. Or you can work around it in the old version by instead using
the ".mode insert" output, as described in the comments here:
http://macscripter.net/articles/436_0_10_0_C/
But parsing SQLite output from the command line (or do shell script)
is in general a pain like re-inventing the wheel. I wish Apple would
release some useful and straightforward hooks into SQLite from
AppleScript.
I can build a newer version of SQLite on my Mac
Yes, it's pretty straightforward, if you have the developer tools
installed, by downloading the source code and following the command
line instructions from:
http://www.sqlite.org/download.html
but if I then want to give my AppleScript to someone else can I
'bundle' my newer build of SQLite with it
In terms of licensing, yes. The SQLite website proclaims that you can
do anything with it and distribute however you like.
As to how you would do it, I'd be interested to know that myself :-/
and if so how will "Do Shell Script" know which version of SQLite
to use?
When you call sqlite3 from the command line (or do shell script), it
uses the version that came installed in the system at:
/usr/bin/sqlite3
If you build and install a newer version of SQLite, it is installed in:
/usr/local/bin/sqlite3
If you just call the command via "sqlite3", then the built in system
(old) version is used. You have to specify the full path to use the
newer version.
I hope this helps,
Tom
T&B
_______________________________________________
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/mailman//archives/applescript-users
This email sent to email@hidden