How do I create an "Allow Zero Length" text field from VBScript?
Posted on 2003-10-28
I'm trying to create a Microsoft Access database with a text field having its "Allow Zero Length" property set to True. I want to do this in ASP, using VBScript and ADOX.
This code shows me that I can display the columns properly, because it shows me the column names and types:
For Each col In .Columns
Response.Write(col.Name & ", " & col.Type & "<br>")
' If col.Name = "Phone" Then
' col.Properties("Jet OLEDB:Allow Zero Length") = True
' End If
(previously in the code, "col" was set with "Set col = CreateObject ("ADOX.Column")")
But when I uncomment those three lines, I get the following error from the middle line:
Item cannot be found in the collection corresponding to the requested name or ordinal.
Why doesn't this code work?