• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
RE: SQLite Version Problems
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: SQLite Version Problems


  • Subject: RE: SQLite Version Problems
  • From: "Simon Wolf" <email@hidden>
  • Date: Tue, 30 Jan 2007 13:03:25 -0000
  • Importance: Normal

Hi Tom,

Thank you for your reply.

> > I am using SQLite via "Do Shell Script" in an AppleScript
> application
>
> Is this built using Xcode (aka AppleScript Studio)?

At the moment it is just a normal script (written in Script Debugger) but it
will become part of an AppleScript Studio application I think.


> > 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/

It was actually your comments posted to that article that prompted me to ask
here since I thought that it would be easier to upgrade to 3.3.9 or higher.

> 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 am currently very tempted to buy a copy of the SQLiteAddOns Scripting
Addition (http://www.sqlabs.net).  A developer license is not cheap but if I
reach the point of wanting to sell my scripts commercially then it may be
worth it.

> > 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

Excellent, thanks.

> > 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 :-/

Ah!  So it's not very easy then ... 80(

> > 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.

Ah, so if a newer build of SQLite is sitting in the same directory as the
script then I can reference that one and force its use.

I'll have a look into building a newer version of SQLite and then, once I am
completely confused, I will buy the SQLiteAddOns Scripting Addition!

Many thanks.

Simon

--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.5.432 / Virus Database: 268.17.14/658 - Release Date: 29/01/2007
14:49


 _______________________________________________
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

References: 
 >Re: SQLite Version Problems (From: T&B <email@hidden>)

  • Prev by Date: Re: SQLite Version Problems
  • Next by Date: Re: Get Resolution of Embeded Image(s) in Illustrator CS2
  • Previous by thread: Re: SQLite Version Problems
  • Next by thread: Problem reading UTF8 source email from OS X Mail application
  • Index(es):
    • Date
    • Thread