Re: [ANN] Announcing ScriptDB, The AppleScript database OSAX
Re: [ANN] Announcing ScriptDB, The AppleScript database OSAX
- Subject: Re: [ANN] Announcing ScriptDB, The AppleScript database OSAX
- From: Hanaan Rosenthal <email@hidden>
- Date: Wed, 17 Nov 2004 07:04:15 -0500
To import in tab-delim you must specify a database first:
(This may not work if you don't have the word "file" after 'db load' in the last line.
Ommited in the sample script and to be fixed pater today.
Give it another shot.
-- create the database
set my_fields to {{"name", string}, {"age", integer}}
set my_db to DB create with properties {DBName:"contacts", DBFields:my_fields}
-- add records
set my_records to {{"Beth", 24}, {"Jack", 30}, {"Olivia", 10}, {"Pikachu", 3}, {"Harry", 13}}
set my_db to DB add records my_records to db my_db
-- save to tab delimited text file
set db_tab_file_path to (path to desktop) & "database.txt" as string
DB save my_db to file db_tab_file_path format txt
-- load tab delimited to another database
set my_fields to {{"name", string}, {"age", integer}}
set new_db_2 to DB load file db_tab_file_path with properties {DBFields:my_fields} format txt
On Nov 17, 2004, at 2:48 AM, Bruce Robertson wrote:
••• Announcing ScriptDB •••
AppleScript's Built-in database OSAX
•••
Interesting; but the tab-delim text import script doesn't work.
--
Hanaan Rosenthal * Custom Flow Solutions
MEDIA AUTOMATION CONSULTING
401-487-2957 * email@hidden
* www.customflowsolutions.com *
be successful... ...work less.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden