

Somehow they are storing a plist inside of a table that must get loaded/edited in an odd way by the "Database Events Application" When in applescript you declare a new Database with the name:"Name", it then saves the file as Name.dbev.Īnyways, I think what's happening is Apple isn't really saving the file out in an SQLite way that can be read by sqlite by default. However, the standard SQL database name ("info" in the example) isn't used. There should be the specification of a database ("Info"), table("name"), and then records. Well, that could be the filename (Name.dbev).īut it's still leaving out information.

So does the fact that there is plist information embedded in what should be an SQLite db. The dbevLayout = 0 in the plist concerns me. However, this pulls in the plist and binary data. I can "attach" this file to an existing db by using the sqlite3 command ".import myDB.dbev myTable" using an existing table in an existing database created with sqlite. * this Z_LIST BLOB is a Plist that looks like so: * Editing the file, the top of the dbev says it is an "SQLite Format 3", following by a lot of binary data, then what appears to be an sql schema which is like "CREATE TABLE Z_METADATA(Z_VERSION INTEGER PRIMARY KEY, Z_UUID VARCHAR(255), Z_PLIST BLOB)"

* Writing out the db example produces a myDB.dbev (assumedly a 'database events' file) I've fiddled with it some more and found the following: For instance, in your "theory example" (nice name ) you say the database is "Info", but this can't be set in the Applescript?
SQLITE FOR MAC OUTPUT HOW TO
My goal is to open this db, grab records and display them in a list, and allow a user to add more records to the db for later use.Īny more suggestions on how to open an existing DB, search tables/records, and get their data? Thanks again! I actually already have an sqlite db I've created from a larger mysql database. So I'm at a loss how this is truly useful? I really want to be able to do decent sql queries (which sqlite3 supports) such as "select * from table1" or "select name, date from table1 where amount > 100". I verified this by trying out sqlitebrowser ( ) which won't open the db at all. It opens, but there are no records since there are no tables. What's even more, after creating a new database with the example Applescript, sqlite3 doesn't even think it is a valid database. I guess the expectation is a script would just keep creating records? Then when I later want to use these records I would increment through them all, searching for the record I want by looking at a particular field? It appears the Data Events Suite doesn't even support tables at all. However, this is different from a typical SQL database in that there was no table created. Your example creates a record, and adds fields. This may actually be a problem with the "Data Events Suite" implementation itself. Thank you very much for the info, that's much more than I could find *anywhere*.
