CREATE TABLE "deleteion" control

Andrew Sinning andrew at learningware.com
Tue Aug 19 15:03:03 CDT 2003


(Note, I'm using Valentina for Macromedia Director, which is why the
syntax may look a little strange.)

In the following trial, after creating 'sounds' and 'graphics', when I
try to create the table infos, I get an error "Wrong field type".  What
am doing wrong?


-- sounds
  sql = "CREATE TABLE sounds \
( soundId UMedium NOT NULL UNIQUE,\
  fileName string(50) NOT NULL)"
  --
  SQLExecute(gValentinaDB,sql)
  put "sounds " && ValentinaErrorString()

NO ERROR!

-- graphics
  sql = "CREATE TABLE graphics \
( graphicId UMedium NOT NULL UNIQUE,\
  fileName string(50) NOT NULL)"
  --
  SQLExecute(gValentinaDB,sql)
  put "graphics " && ValentinaErrorString()

NO ERROR!

  -- infos
  sql = "CREATE TABLE infos \
( infoId UMedium NOT NULL UNIQUE,\
  stemText varchar(1024) NOT NULL,\
  graphicId REFERENCES graphics ON DELETE SET_NULL,\
  soundId REFERENCES sounds ON DELETE SET_NULL)"
  --
  SQLExecute(gValentinaDB,sql)
  put "infos " && ValentinaErrorString()

ERROR "Wrong field type"




More information about the Valentina mailing list