View Single Post
  #9  
Old March 15th, 2005, 10:54 AM
Jamie Collins
external usenet poster
 
Posts: n/a
Default

rpw wrote:
does this 'code' go?


It's SQL DDL i.e. a Standard way of saying, 'Add this column and this
constraint to your table.' You could actually execute this DDL using:

CurrentProject.Connection .Execute "DDL here"

but obviously I'm guessing element names etc.

Isn't it adding a
field to a table and then adding validation rules?


Essentially yes, although a CHECK constraint is more powerful than a
Validation rule e.g. a CEHCK can reference other columns in the same
row and columns in other tables.

Why is this a 'short cut'?


Tim should address this one. AFAIK a row-level CHECK constraint
involves less overhead than a database-level FOREIGN KEY constraint,
however I think Tim's comment was meant pejoratively, so I'm stumped.

Jamie.

--