DDL For "Allow Empty"

  • Thread starter Jonathan Scott via AccessMonster.com
  • Start date
J

Jonathan Scott via AccessMonster.com

I am at a loss as to how to express the "Allow Empty" in the definition of a
new column via DDL. Can someone explain to me how this can be done via DDL?

Much appreciated,
Jonathan Scott
 
A

Allen Browne

Jonathan, are you talking about the Required property or the Allow Zero
Length property?

I would have expected Required to default to No in all versions of Access,
regardless of whether the field is created through DDL, DAO, or ADOX.

If you are talking about the Allow Zero Length property, MS really messed
this up. It defaults to No in versions of Access before 2000, but since then
it behaves inconsistently: sometimes defaulting to Yes and sometimes to No,
depending whether you created the field through the interface, DAO, DDL,
ADOX, or Make Table query. I don't believe there is a way to set it with
DDL, but it can be set with DAO or ADOX.

--
Allen Browne - Microsoft MVP. Perth, Western Australia.

Reply to group, rather than allenbrowne at mvps dot org.

message
news:[email protected]...
 
J

Jonathan Scott via AccessMonster.com

Allen,

Yes, I did a little searching, and found people saying it is not possible to
play with the "Allow Zero-Length" property in DDL. Sorry about messing up the
name of the property, as it is in Japanese, and wasn't sure what the English
equivalent was.

I created a little bit of a hack-around: I check to see if the user is
specifying DDL for creating a new column, and if it is nullable or not, and
act appropriately.

I'm creating a tool for checking the differences between two DBs (live,
current), and specifying rules(DDL) into groups that you can use to update
the live DB. Isn't so very pretty so far, but it works wonders.

Now how to create a check that the data inside is being properly updated.....

Thanks Allen!
Jonathan Scott


Allen said:
Jonathan, are you talking about the Required property or the Allow Zero
Length property?

I would have expected Required to default to No in all versions of Access,
regardless of whether the field is created through DDL, DAO, or ADOX.

If you are talking about the Allow Zero Length property, MS really messed
this up. It defaults to No in versions of Access before 2000, but since then
it behaves inconsistently: sometimes defaulting to Yes and sometimes to No,
depending whether you created the field through the interface, DAO, DDL,
ADOX, or Make Table query. I don't believe there is a way to set it with
DDL, but it can be set with DAO or ADOX.
I am at a loss as to how to express the "Allow Empty" in the definition of
a
[quoted text clipped - 3 lines]
Much appreciated,
Jonathan Scott
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top