• 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: Shell Scripting SQLite
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Shell Scripting SQLite


  • Subject: Re: Shell Scripting SQLite
  • From: BareFeet <email@hidden>
  • Date: Sat, 31 May 2008 10:35:56 +1000

Hi Bruce,

But I still don't have what I want, which is to hold the database itself in a variable.

The above technique works with a "dump" verion of a database. A set of SQL instructions.

Send all the instructions to sqlite and make it regenerate the entire database and then query it when done. But why do I have to bother with all that regeneration?

I think this is the bottom line for you:

You could conceivably dump an entire SQLite database file into an AppleScript variable that you could then store in a FileMaker field. But you will have to write it back to disk whenever you want to access it.

Something simple like:

set databasePath to "/Users/bruce/Documents/myDB.sqlite"
set databaseContents to do shell script "cat " & quoted form of databasePath
tell application "FileMaker Pro"
-- set the contents of the field you want to databaseContents
end tell


But in order to later use that database, you'll have to write that same data back to a file, such as just a temporary file, so you can get SQLite to access it.

This is a very convoluted way to do it. Of course FileMaker itself is storing the data ultimately on disk, though you may seem to be accessing it through memory.

If we take the suggestions as far as I've seen so far, you would have the bizarre situation of three database engines:

1. Data stored in SQLite.

2. FileMaker storing the SQLite database.

3. Database Events (a database engine) shifting the SQLite data in and out of FileMaker.

So, I suggest stepping back and reconsidering the method. Perhaps you can do all that you need in SQLite directly, without storing in FileMaker. It's likely to me much faster, simpler and open to linking with other systems. You can fairly easily coordinate both database systems and funnel output from one into the other, without trying to totally embed one in the other.

HTH
Tom
BareFeet

 --
Comparison of SQLite database tools for Mac OS X:
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
  • Follow-Ups:
    • Re: Shell Scripting SQLite
      • From: Bruce Robertson <email@hidden>
References: 
 >Re: Shell Scripting SQLite (From: Bruce Robertson <email@hidden>)

  • Prev by Date: Re: Help
  • Next by Date: Re: Shell Scripting SQLite
  • Previous by thread: Re: Shell Scripting SQLite
  • Next by thread: Re: Shell Scripting SQLite
  • Index(es):
    • Date
    • Thread