Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to allow zero length strings with DDL statement 1

Status
Not open for further replies.

klm2klm2

Programmer
Dec 24, 2002
36
0
0
US
I have a DDL statement similar to this:

alter table blah_table
add column
blah_column char(20);

The statement *does* add the new column. However, I want the "Allow zero length" column property to be set affirmatively.

How can this be done in a DDL statement?

If it can't be done with DDL, how can it be done in a programatic manner? This action needs to occur as part of an application revision upgrade routine.

Thanks,
Kim
 
I don't know of a way to do this with DDL (though
there may be a way I don't know about), but it can
be done programmatically by setting the field's
"AllowZeroLength" property to True.

I was able to set this property for a field in a
test table from the Immediate Window like so:

currentdb.TableDefs("testtable")("testfield").AllowZeroLength = True
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top