Hi

How to discover that field should be set.
This is Access database.

Thanks
Konrad

Re: How to discover required field by William

William
Wed Sep 17 13:11:27 CDT 2003

Not sure if I understand, but if you are looking to see if a field allows
nulls or not (if not, you have to put something in it), then this should
work. However, if you have a defaultvalue, then it can no allow nulls but
still not be required per se.



foreach( DataColumn dc in dt.Columns )
{
listBox1.Items.Add(dc.ColumnName+" , "+dc.DataType +" ,"+dc.Unique +"
,"+dc.AutoIncrement+" ,"+dc.AllowDBNull + ", " + dc.DefaultValue );
}

}



dc.AllowDBNull will be true if it's not required.

"Konrad" <konrad007@poczta.onet.pl> wrote in message
news:bka2gu$cu6$1@nemesis.news.tpi.pl...
> Hi
>
> How to discover that field should be set.
> This is Access database.
>
> Thanks
> Konrad
>
>



Re: How to discover required field by stevenbr

stevenbr
Wed Sep 17 17:20:20 CDT 2003

Thanks for the excellent answer, William!

Steven Bras, MCSD
Microsoft Developer Support/Data Access Technologies

This posting is provided "AS IS" with no warranties, and confers no rights.

Microsoft Security Announcement: Have you installed the patch for Microsoft
Security Bulletin MS03-026?  If not Microsoft strongly advises you to
review the information at the following link regarding Microsoft Security
Bulletin MS03-026
http://www.microsoft.com/security/security_bulletins/ms03-026.asp and/or to
visit Windows Update at http://windowsupdate.microsoft.com to install the
patch. Running the SCAN program from the Windows Update site will help to
insure you are current with all security patches, not just MS03-026.