Re: Recognize NOT NULL field in Access 2003
- From: Brian Bushay TeamB <BBushay@xxxxxxxxx>
- Date: Tue, 29 Aug 2006 19:25:46 -0500
Is there a way to recognize either a field is marked as NOT NULL (required
field) or not in Access 2003?
I already tried to use the REQUIRED property in TField, but it seems to
operate inside the application only. It doesn't really reflects what's set
in the database.
I'm using TADOConnection and TADOTable to open these tables.
First there is no Access 2003 in ADO. Access has not updated the database
format since version 2000.
You can find out the required property of a field using the
AdoConnection.OpenSchema method
ADOConnection1.OpenSchema(siColumns
,VarArrayOf([Unassigned,Unassigned,'Customers',Unassigned]),EmptyParam,ADODataSet1)
How ever Access also has an "Allow Zero length" property for fields.
This is not a standard ADO property so the only way to find out how it is set is
to use ADOX
To use ADOX you need to import the Microsoft ADOX type library
--
Brian Bushay (TeamB)
Bbushay@xxxxxxxxx
.
- Follow-Ups:
- References:
- Recognize NOT NULL field in Access 2003
- From: TMA
- Recognize NOT NULL field in Access 2003
- Prev by Date: Re: TDBmemo fields and Memory Tables
- Next by Date: Re: JPEG in Blob Field Access 2003
- Previous by thread: Recognize NOT NULL field in Access 2003
- Next by thread: Re: Recognize NOT NULL field in Access 2003
- Index(es):
Relevant Pages
|