Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

VFRulez

macrumors newbie
Original poster
Jun 14, 2013
19
8
Hello,

can anyone point me to a source where I can learn about, how to access/manipulate SQLite Databases with AppleScript?

Thank you!
 
Hello,
can anyone point me to a source where I can learn about, how to access/manipulate SQLite Databases with AppleScript?

Hi,

Assuming you already understand SQLite, then there's some good stuff here:

http://macscripter.net/viewtopic.php?pid=190866

The recommended technique suggested there seems to be to go via "do shell script" and use sqlite3. Of course, depending on what you want to achieve, you might be able to ditch AppleScript and work in a shell script.

That said, personally I wouldn't work with SQLite using AppleScript or shell script if I could help it. I'd probably go via FMDB in Objective-C:

https://github.com/ccgus/fmdb

If you must use AppleScript then maybe try to get FMDB working with AppleScriptObjC - I've not tried that myself so I can't comment on how easy/nasty it might be.

Good luck!
 
My current problem is that I do work with a financial controlling software that stores the application data in a SQLite db, so in the respective SQLite files.
As well I do use for the in-processing into my storage a barcode-scanner & mysql db.

What I want to do is to enrich the information in the financial software by the storage information from the mysql db. Thats a functionality the financial software does not have, but would help me to control purchases and stock value.
So my idea was to get an applescript to do exactly this.

Maybe thats a stupid idea that will never work, maybe there is an easier way I do just not know. :)
 
You might want to consider Python rather than AppleScript. There are tons of information and examples on the web using SQLite and Python. Good luck
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.