Relation links

James Milne james.milne at mac.com
Tue Feb 24 18:09:53 CST 2004


Hi all,

I'm trying to figure out how to build relation links between tables 
using SQL.

Here is the code I'm using to be a part of my schema:

   ' Create timeline table
   statement = "create table timeline ("
   statement = statement + "name varchar(64) indexed "
   statement = statement + ")"

  recCnt = db.SqlExecute( statement )

   ' Create timeline track table
   statement = "create table timelineTrack ("
   statement = statement + "fkTimeline ulong references timeline on 
delete cascade, " // foreign key to timeline
   statement = statement + "key varchar(32) "
   statement = statement + ")"

  recCnt = db.SqlExecute( statement )

   ' Create timeline clip table
   statement = "create table timelineClip ("
   statement = statement + "fkTrack ulong references timelineTrack on 
delete cascade, " // foreign key to track
   statement = statement + "position double, "
   statement = statement + "inPoint double, "
   statement = statement + "outPoint double, "
   statement = statement + "path text(64) "
   statement = statement + ")"

  recCnt = db.SqlExecute( statement )

   ' Create timelineKeyframe table
   statement = "create table timelineKeyframe ("
   statement = statement + "fkTrack ulong references timelineTrack on 
delete cascade, " // foreign key to track
   statement = statement + "position double, "
   statement = statement + "value double "
   statement = statement + ")"

  recCnt = db.SqlExecute( statement )

This code doesn't seem to be working. Any ideas what is wrong with it?

--
JAmes Milne



More information about the Valentina mailing list