Field Properties

L

Lou Civitella

Access 2000/2003

I was looking at getting all the properties for a field in a table. I used
DAO and ADO. They both bring back different results. For example the
Description property only shows when I run my ADO code.

Why are there differences between the code and how can I just bring in all
the properties of the field without having to use both DAO and ADO?

Thanks In Advance,
Lou
 
B

Brendan Reynolds

DAO was designed for Jet. ADO was designed as a more general purpose data
access technology, and is not so closely tied to Jet. Also, DAO combines
both data manipulation and data definition functionality. In ADO, these are
split between ADODB and ADOX. These are some of the reasons why you will get
different results from the two.

The DAO Description property isn't created until the first time a value is
assigned to it. If you open your table in design view, give the field a
description, save your changes and then re-run your code, you'll find that
the DAO code will now list the Description property.

Generally, when working with Jet databases, DAO does an excellent job of
providing easy access (no pun intended) to the properties that most of us
use most of the time. But depending on what you want to do, there may be
times when ADO is a better match to your needs, and there may, indeed, be
times when you need to use both.

--
Brendan Reynolds (MVP)
http://brenreyn.blogspot.com

The spammers and script-kiddies have succeeded in making it impossible for
me to use a real e-mail address in public newsgroups. E-mail replies to
this post will be deleted without being read. Any e-mail claiming to be
from brenreyn at indigo dot ie that is not digitally signed by me with a
GlobalSign digital certificate is a forgery and should be deleted without
being read. Follow-up questions should in general be posted to the
newsgroup, but if you have a good reason to send me e-mail, you'll find
a useable e-mail address at the URL above.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top