ADO Help! / Field Properties (1 Viewer)

ADO-Nick

New member
Local time
Today, 16:31
Joined
Oct 2, 2003
Messages
8
Hi All,

I am trying to set a property defined by MS Access, which applies to an ADO object but isn't recognised by the Jet Database engine.

Help that I've found so far suggests that I must:

1) create the property
2) append it to the properties collection
3) then it can be set in the normal way

The property I'm trying to set is the "Required" property on a field (a number field) to "false"

Any suggestions, especially examples, of how it is done gratefully received!!!!

Nick Porter
info@retrop.biz
 

Travis

Registered User.
Local time
Today, 08:31
Joined
Dec 17, 1999
Messages
1,332
Here are the properties:

0: Autoincrement
1: Default
2: Description
3: Nullable -> Setting this to True makes the field required/False makes the field not required
4: Fixed Length
5: Seed
6: Increment
7: Jet OLEDB:Column Validation Text
8: Jet OLEDB:Column Validation Rule
9: Jet OLEDB:IISAM Not Last Column
10: Jet OLEDB:AutoGenerate
11: Jet OLEDB:One BLOB per Page
12: Jet OLEDB:Compressed UNICODE Strings
13: Jet OLEDB:Allow Zero Length
14: Jet OLEDB:Hyperlink
 

ADO-Nick

New member
Local time
Today, 16:31
Joined
Oct 2, 2003
Messages
8
Conclusion

This problem turned out to be due to needing to specify the .ParentCatalog of the column object BEFORE appending the column!
Successful code:

With objADOXCol
.Attributes = adColNullable
.name = pDate
.type = adSingle
.ParentCatalog = objADOXCat
End With

objADOXCat.Tables(arTables(i)).Columns.Append objADOXCol

The "required" field in ACCESS then became false

Thanks to all those who helped/read post.:D
 

Users who are viewing this thread

Top Bottom