Re: Valentina
Re: Valentina
- Subject: Re: Valentina
- From: David Hood <email@hidden>
- Date: Wed, 10 Apr 2002 09:36:01 +1200
On Wednesday, April 10, 2002, at 12:51 AM, Paul Skinner wrote:
Has anyone got any working code for creating a valentina (carbon)
database and base objects?
Here (below) is some code I used the other day for creating a database
file (called cav) with one base object and rather a lot of fields in the
same folder as a valentina application (so you'll need write access to
that folder).
How about accessing them?
I've probably got something on hand, but they're fairly specific, so
what exactly do you mean by accessing?
--------------------------
Create()
tell application "Valentina Carbon"
close database "cav"
end tell
----------------------------------------------------------------------------
on Create()
tell application "Valentina Carbon"
activate
set theDB to make new database with data file "cav"
tell theDB
set ER to make new base object with properties {name:"ER"} at end
tell ER
make new field with properties {name:"ID", type:tULong} at end
make new field with properties {name:"Year", type:tUShort} at end
make new field with properties {name:"Surname",
type:tString, length:30} at end
make new field with properties {name:"Firstnames",
type:tString, length:50} at end
make new field with properties {name:"Sex",
type:tString, length:4} at end
make new field with properties {name:"Marital",
type:tString, length:4} at end
make new field with properties {name:"Qual",
type:tString, length:30} at end
make new field with properties {name:"StreetNo",
type:tString, length:30} at end
make new field with properties {name:"StreetName",
type:tString, length:30} at end
make new field with properties {name:"Street", type:tLong} at end
make new field with properties {name:"SuburbName",
type:tString, length:30} at end
make new field with properties {name:"OcName",
type:tString, length:30} at end
make new field with properties {name:"OcSpec", type:tUShort} at end
make new field with properties {name:"OcGroup", type:tUShort} at end
make new field with properties {name:"Notes",
type:tString, length:30} at end
make new field with properties {name:"OcSource",
type:tString, length:30} at end
make new field with properties {name:"OcStones",
type:tString, length:30} at end
make new field with properties {name:"RollPeriod",
type:tUShort} at end
make new field with properties {name:"Status",
type:tString, length:30} at end
make new field with properties {name:"Match",
type:tString, length:30} at end
make new field with properties {name:"OldID", type:tULong} at end
make new field with properties {name:"UniqueID", type:tULong} at end
make new field with properties {name:"LinkToNext",
type:tULong} at end
make new field with properties {name:"YearOfBirth",
type:tUShort} at end
make new field with properties {name:"YOBSource",
type:tString, length:30} at end
end tell
end tell
end tell
end Create
-----------------------
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.
References: | |
| >Valentina (From: Paul Skinner <email@hidden>) |