将DAO导入.NET项目 [英] Importing DAO into .NET Project

查看:76
本文介绍了将DAO导入.NET项目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Access论坛中有人解释说我可以使用DAO API从

Access中检索元数据。我具体要检索每个列和表的

的注释。我还想检索与MSAccess中每列相关联的控件。


当我启动VS.NET启动项目时,我找不到DAO要

导入!它在哪里?我假设它是一个COM接口。我认为DAO也有一个C

接口 - 这叫做什么?还有原生的.NET

界面吗?


谢谢,

齐格弗里德

Someone in the Access forum explained that I could retrieve metadata from
Access with the DAO API. I specifically what to retrieve the comments for
each column and table. I also want to retrieve the control associated with
each column in MSAccess.

When I fired up VS.NET to start the project, I could not find the DAO to
import! Where is it? I assume it is a COM interface. I think there is a C
interface too for DAO -- what is that called? Is there a native .NET
interface too?

Thanks,
Siegfried

推荐答案

DAO已经超过5年了。

ADO取代了DAO。

虽然你可以在.NET到ADO库,.NET的原生

数据库连接技术是ADO.NET。

" Siegfried Heintze" < SI ******* @ heintze.com>在消息中写道

news:u6 ************* @ TK2MSFTNGP10.phx.gbl ...
DAO has been a dead technology for over 5 years.
ADO replaced DAO.
While you can make a COM reference in .NET to the ADO library, .NET''s native
database connection technology is ADO.NET.
"Siegfried Heintze" <si*******@heintze.com> wrote in message
news:u6*************@TK2MSFTNGP10.phx.gbl...
Access论坛中有人解释我可以使用DAO API从
Access中检索元数据。我具体要检索每个列和表的注释。我还想检索与MSAccess中每列相关的控件。

当我启动VS.NET启动项目时,我找不到要导入的DAO
!它在哪里?我假设它是一个COM接口。我认为DAO也有一个C
界面 - 这叫做什么?是否有原生的.NET
界面?

谢谢,
Siegfried
Someone in the Access forum explained that I could retrieve metadata from
Access with the DAO API. I specifically what to retrieve the comments for
each column and table. I also want to retrieve the control associated with
each column in MSAccess.

When I fired up VS.NET to start the project, I could not find the DAO to
import! Where is it? I assume it is a COM interface. I think there is a C
interface too for DAO -- what is that called? Is there a native .NET
interface too?

Thanks,
Siegfried



Seigfried,

虽然最好使用ADO.NET而不是ADO,但是使用比DAO更好的ADO.NET,DAO仍然存在。我们只知道多长时间,因为它是一种过时的技术 - 它可能会死亡但它还没有死。


对于表和列的属性,如果你是
,最好在VS.NET中查看

System.Data.DataTable和System.Data.DataColumn对象。
从头开始 - 这就是事情的发展方向。如果AdoDotAnything将检索显示控件的属性,我不确定

一个

访问表 - 我没试过。


但是,如果你需要将DAO移植到.NET中,你应该能够做到这一点。我
可以看到对Microsoft DAO 3.6 Object Library的COM引用。以及当我添加对VB.NET

项目的引用时,
引用了早期版本的DAO。如果您的PC上有文件C:\Program Files \ Microsoft /

Shared\DAO\dao360.dll,但它没有显示为a

COM参考,它只是没有正确注册。


希望这会有所帮助,

David Straker

" Scott M." < S - *** @ badspamsnet.net>在消息中写道

新闻:%2 *************** @ TK2MSFTNGP09.phx.gbl ...
Seigfried,
While it is best to use ADO.NET in preference to ADO and it is better to use
ADO than DAO, DAO is still around. We just don''t know for how long because
it is an obsolescent technology - it may be dying but it''s not dead yet.

For properties of tables and columns, you''d be better off looking at the
System.Data.DataTable and System.Data.DataColumn objects in VS.NET if you''re
starting from scratch - that''s the direction things are going. I''m not sure
if AdoDotAnything will retrieve the property for the "Display Control" of an
Access table - I haven''t tried that.

However, if you need to port DAO into .NET, you should be able to do it. I
can see a COM reference to "Microsoft DAO 3.6 Object Library" as well as
references to earlier versions of DAO when I add a reference to a VB.NET
project. If you have the file "C:\Program Files\Microsoft
Shared\DAO\dao360.dll", for example, on your PC but it''s not showing up as a
COM reference, it''s just not registered properly.

Hope this helps,
David Straker

"Scott M." <s-***@badspamsnet.net> wrote in message
news:%2***************@TK2MSFTNGP09.phx.gbl...
DAO已经5年以上的死技术。
ADO取代了DAO。
虽然您可以在.NET中为ADO库创建COM引用,但.NET的
本机数据库连接技术是ADO .NET。

" Siegfried Heintze" < SI ******* @ heintze.com>在消息中写道
新闻:u6 ************* @ TK2MSFTNGP10.phx.gbl ...
DAO has been a dead technology for over 5 years.
ADO replaced DAO.
While you can make a COM reference in .NET to the ADO library, .NET''s native database connection technology is ADO.NET.
"Siegfried Heintze" <si*******@heintze.com> wrote in message
news:u6*************@TK2MSFTNGP10.phx.gbl...
Access论坛中有人解释说我可以检索使用DAO API从Access获取元数据
。我具体要检索每个列和表的注释
。我还想检索与MSAccess中每列相关联的
的控件。

当我启动VS.NET启动项目时,我找不到要导入的DAO
!它在哪里?我假设它是一个COM接口。我认为DAO也有一个
的C接口 - 这叫做什么?是否有原生的.NET
界面?

谢谢,
齐格弗里德
Someone in the Access forum explained that I could retrieve metadata from Access with the DAO API. I specifically what to retrieve the comments for each column and table. I also want to retrieve the control associated with each column in MSAccess.

When I fired up VS.NET to start the project, I could not find the DAO to
import! Where is it? I assume it is a COM interface. I think there is a C interface too for DAO -- what is that called? Is there a native .NET
interface too?

Thanks,
Siegfried





对于表和列的属性,你最好还是看看System.Data.DataTable和
访问表 - 我没有尝试过。
For properties of tables and columns, you''d be better off
looking at the System.Data.DataTable and
System.Data.DataColumn objects in VS.NET if you''re
starting from scratch - that''s the direction things are
going. I''m not sure if AdoDotAnything will retrieve
the property for the "Display Control" of an
Access table - I haven''t tried that.




我试过了 - 我错过了什么吗?我编写了一个程序,使用了一个

树视图来显示我在DataTable中找到的所有内容和

DataColumn,我找不到像

对表和列的注释以及用于每列

的控件类型。


这并不让我感到惊讶 - 为什么会这样通用API有MSAccess

特定的东西。我也尝试过使用ADOX,可以得到一些但不是全部的元数据。$ / b
MSAccess是唯一可以让你使用的数据库(我知道)为你定义的每一列存储一个

控件(复选框,下拉列表等等)。


为什么你说DAO会消失?我希望不是!这是

执行MSAccess特定内容的唯一方法! MSAccess是否有更好的API

特定的东西?那样就好了!或者我应该从你的声明中推断

MSAccess还没有死但已经死了?


谢谢,

齐格弗里德

***通过开发人员指南 http://www.developersdex.com发送 ***

不要只是参加USENET ......获得奖励!



I''ve tried that -- did I miss something? I wrote a program that used a
treeview view to display everything I could find in the DataTable and
DataColumn and I could not find the MSAccess specific metadata like the
comments for the table and the columns and the control type used for
each column.

This does not surprise me -- why would a generic API have MSAccess
specific stuff. I also tried using ADOX and could get some but not all
of the metadata.

MSAccess is the only database (that I know of) that lets you store a
control (checkbox, dropdown list, etc...) for each column you define.

So why do you say DAO is going away? I hope not! It is the only way of
doing MSAccess specific stuff! Is there a better API for MSAccess
specific stuff? That would be nice! Or should I infer from you statement
that MSAccess is not dead yet but dying?

Thanks,
Siegfried

*** Sent via Developersdex http://www.developersdex.com ***
Don''t just participate in USENET...get rewarded for it!


这篇关于将DAO导入.NET项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆