ALTER TABLE query - "Allow zero length"

G

Guest

I'm trying to add a column to an Access 2000 DB using SQL. I know that I can
add the "NULL" criterion to make sure that it isn't a required field, but is
there a SQL command for me to also turn "Allow zero length" to be yes?

Thanks.
 
R

RoyVidar

MDW said:
I'm trying to add a column to an Access 2000 DB using SQL. I know that I can
add the "NULL" criterion to make sure that it isn't a required field, but is
there a SQL command for me to also turn "Allow zero length" to be yes?

Thanks.

Not that I'm aware of.

You can use either ADOX or DAO to change it after the column is created.
 
R

RoyVidar

RoyVidar said:
Not that I'm aware of.

You can use either ADOX or DAO to change it after the column is created.

Perhaps I should have said a bit about how?

In this article by Allen Browne, there's a good piece of DAO code
http://allenbrowne.com/bug-09.html

Assume you have a valid connection object, then something like
this could probably work with ADOX

With CreateObject("ADOX.Catalog")
Set .ActiveConnection = TheConnection
.Tables("TheTable").Columns("TheColumn").Properties( _
"Jet OLEDB:Allow Zero Length").Value = False
End With

This doesn't need any reference.
 

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