| View previous topic :: View next topic |
| Author |
Message |
Yannis Makarounis Guest
|
Posted: Wed Feb 11, 2004 5:21 pm Post subject: Getting the properties of the DB tables |
|
|
Is there a way to get the properties of the DB tables using ADO? For example
I would like to know if for a specific field the Null value is allowed or
not. I tried checking the Required property of a TField but it always
returns false. Fielddefs[nn].attributes does not seem to work either.
Thanks
Yannis
|
|
| Back to top |
|
 |
Viatcheslav V. Vassiliev Guest
|
Posted: Thu Feb 12, 2004 7:15 am Post subject: Re: Getting the properties of the DB tables |
|
|
Use ADO recordset field attributes:
TADODataSet.Recordset.Fields('MyColumn').Attributes and adFldIsNullable <> 0
Look for other attribute values in MSDN or ADO documentation.
//------------------------------------------
Regards,
Vassiliev V. V.
http://www.managed-vcl.com - using .Net objects in Delphi for Win32 +
ADO.Net
http://www.oledbdirect.com - The fastest way to access MS SQL Server,
MS Jet (Access) and Interbase (through OLEDB)
"Yannis Makarounis" <Yannis.Makarounis (AT) ace-hellas (DOT) gr> сообщил/сообщила в
новостях следующее: news:402a6499$1 (AT) newsgroups (DOT) borland.com...
| Quote: | Is there a way to get the properties of the DB tables using ADO? For
example
I would like to know if for a specific field the Null value is allowed or
not. I tried checking the Required property of a TField but it always
returns false. Fielddefs[nn].attributes does not seem to work either.
Thanks
Yannis
|
|
|
| Back to top |
|
 |
Yannis Makarounis Guest
|
Posted: Thu Feb 12, 2004 11:12 am Post subject: Re: Getting the properties of the DB tables |
|
|
The DB is SQL Server
"Brian Bushay TeamB" <BBushay (AT) Nmpls (DOT) com> wrote
| Quote: |
Is there a way to get the properties of the DB tables using ADO?
What are DB tables?
For example
I would like to know if for a specific field the Null value is allowed or
not. I tried checking the Required property of a TField but it always
returns false. Fielddefs[nn].attributes does not seem to work either.
TadoConnection.Openschema is the ADO method to get information out of your
database but the information it returns is dependant on the Oledb driver
capabilities.
--
Brian Bushay (TeamB)
[email]Bbushay (AT) NMPLS (DOT) com[/email]
|
|
|
| Back to top |
|
 |
|