BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Getting the properties of the DB tables

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Databases (ADO)
View previous topic :: View next topic  
Author Message
Yannis Makarounis
Guest





PostPosted: Wed Feb 11, 2004 5:21 pm    Post subject: Getting the properties of the DB tables Reply with 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
Viatcheslav V. Vassiliev
Guest





PostPosted: Thu Feb 12, 2004 7:15 am    Post subject: Re: Getting the properties of the DB tables Reply with quote



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





PostPosted: Thu Feb 12, 2004 11:12 am    Post subject: Re: Getting the properties of the DB tables Reply with quote



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
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Databases (ADO) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.