cdo.dll / cdosys.dll问题 [英] Problem with cdo.dll/cdosys.dll

查看:75
本文介绍了cdo.dll / cdosys.dll问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用VBA / Access使用CDO发送SMTP邮件。我设置了对

Microsoft CDO for Windows 2000 Library的引用。 (CDOSYS.DLL)。在我的电脑和另一台电脑上,一切正常工作

。但是,在安装了

数据库的另一台PC上,用户收到消息,项目

包含对文件的缺失或损坏的引用 CDO.DLL''版本1.21。

但是,我没有引用cdo.dll;我的引用是cdosys.dll。

用户有cdosys.dll,但没有cdo.dll。


关于什么的任何想法怎么回事?


谢谢!


Neil

解决方案

" Neil Ginsberg" < nr*@nrgconsult.com>在消息中写道

新闻:N1 **************** @ newsread1.news.pas.earthli nk.net ...

我正在使用VBA / Access使用CDO发送SMTP邮件。我设置了对Microsoft Windows CDO for Windows 2000 Library的引用。 (CDOSYS.DLL)。在我的电脑和另一台电脑上,一切都很好。但是,在安装了
数据库的另一台PC上,用户收到消息项目
包含对文件'CDO.DLL'版本1.21的缺失或损坏的引用。
但是,我没有提到cdo.dll;我的参考是
cdosys.dll。用户有cdosys.dll,但没有cdo.dll。

关于发生了什么的任何想法?


尝试

regsvr32 cdosys.dll

b.t.w.两台机器上的cdosys.dll完全一样吗?

谢谢!

Neil



我刚刚得到了更多关于此的信息,这非常有趣。


在我的机器(开发)上,我使用了Microsoft CDO for Windows 2000 Library ;

(cdosys.dll)。工作正常。


使用数据库的客户端位于使用Microsoft Exchange的办公室。在他的

PC上(其中没有错误并且代码工作正常),在引用它之后

说,Microsoft CDO for Microsoft Exchange (cdoex.dll)。


现在,当我交付数据库时,引用的是cdosys.dll。但是当他使用它时,不知何故
,不知怎的,引用变成了cdoex.dll,虽然他没有做任何事情。


Windows是否根据

配置选择哪个是最好的cdo dll?既然他们正在使用Exchange,它是否只是用cdoex.dll替换了对cdosys.dll的

引用?看起来有点奇怪。


无论如何,回到问题PC。他的局域网上的另一台PC是获得错误消息的一台。当我们打开它并查看References时,它有两件事:第一个是对cdoex.dll的引用,就像另一个那样

one;第二个是对Microsoft CDO版本1.21

(cdo.dll)的引用,它被标记为Missing。


所以这台PC不仅将cdosys.dll更改为cdoex.dll(与其他PC一样),

但它还添加了对cdo.dll的破坏引用。我们删除了对

cdo.dll的引用,一切正常。


所以,任何关于发生了什么的想法,为什么这些引用正在交换

out,以及cdo.dll的破坏引用来自哪里?


谢谢!


Neil

" Egbert Nierop(IIS的MVP)" <例如*********** @ nospam.invalid>写在

消息新闻:%2 **************** @ TK2MSFTNGP11.phx.gbl ...

" Neil Ginsberg < nr*@nrgconsult.com>在消息中写道
新闻:N1 **************** @ newsread1.news.pas.earthli nk.net ...

我是使用VBA / Access使用CDO发送SMTP邮件。我设置了对Microsoft Windows CDO for Windows 2000 Library的引用。 (CDOSYS.DLL)。在我的电脑和另一台电脑上,一切都很好。但是,在安装了
数据库的另一台PC上,用户收到消息项目
包含对文件'CDO.DLL''版本的缺失或损坏的引用
1.21."但是,我没有提到cdo.dll;我的参考是
cdosys.dll。用户有cdosys.dll,但没有cdo.dll。

关于发生了什么的任何想法?



试试
regsvr32 cdosys.dll
顺便说一下两台机器上的cdosys.dll完全一样吗?

谢谢!

Neil



" Neil Ginsberg" < nr*@nrgconsult.com>在消息中写道

新闻:hK **************** @ newsread1.news.pas.earthli nk.net ...

我刚刚得到了更多关于此的信息,而且非常有趣。

在我的机器(开发)上,我使用了Microsoft CDO for Windows 2000
Library。 (CDOSYS.DLL)。工作正常。

使用数据库的客户端位于使用Microsoft Exchange的办公室。在
他的PC(其中没有错误,代码工作正常),在引用
下,它说,Microsoft CDO for Microsoft Exchange (cdoex.dll)。

现在,当我交付数据库时,引用的是cdosys.dll。但是当他使用它的时候,不知怎的,引用变成了cdoex.dll,虽然
他没有做任何事情。

Windows就是选择哪个是最好的cdo dll使用,基于
配置?既然他们正在使用Exchange,它是否只是用cdoex.dll替换了对cdosys.dll的引用?看起来有点奇怪。

无论如何,回到问题PC。他的局域网上的另一台PC是收到错误消息的那台PC。当我们打开它并查看引用时,
它有两件事:第一个是对cdoex.dll的引用,就像另一个引用的那样;第二个是对Microsoft CDO版本1.21(cdo.dll)的引用,它被标记为Missing。

所以这台PC不仅改变了cdosys .dll到cdoex.dll(与另一台PC上一样),
但它也添加了对cdo.dll的破坏引用。我们删除了引用
到cdo.dll,一切正常。

所以,任何关于发生了什么的想法,为什么这些引用被
换出,以及对cdo.dll的破坏引用来自哪里?




你最好切换到后期绑定,这不需要

你根本设置了一个引用。这提供了以下好处。


在大多数情况下,代码变得与版本无关。如果你要求Windows

创建一个CDO.Message对象(例如)然后可以使用任何能够创建该对象的注册库



如果在具有硬件的应用程序中不存在适当的库

引用你不仅在尝试使用该库时出现错误,

但引用标记为MISSING会导致许多内置的Access

函数失败。因此,由于缺少电子邮件库,整个应用程序可能会被渲染为无用的
。对于后期绑定,缺少适当的
库的PC只会丢失丢失的库提供的功能。

应用程序的其余部分仍然可以正常工作。

-

我没有查看附加的电子邮件帐户

到此消息。发送给...

在Hunter dot com的RBrandt


I am using VBA/Access to send SMTP mail using CDO. I set a reference to
"Microsoft CDO for Windows 2000 Library" (cdosys.dll). Everything works
fine, both on my PC and on another PC. However, on another PC that the
database was installed on, the user is getting the message, "The project
contains a missing or broken reference to the file ''CDO.DLL'' version 1.21."
However, I don''t have a reference to cdo.dll; my reference is to cdosys.dll.
The user has cdosys.dll, but doesn''t have cdo.dll.

Any ideas as to what''s going on?

Thanks!

Neil

解决方案

"Neil Ginsberg" <nr*@nrgconsult.com> wrote in message
news:N1****************@newsread1.news.pas.earthli nk.net...

I am using VBA/Access to send SMTP mail using CDO. I set a reference to
"Microsoft CDO for Windows 2000 Library" (cdosys.dll). Everything works
fine, both on my PC and on another PC. However, on another PC that the
database was installed on, the user is getting the message, "The project
contains a missing or broken reference to the file ''CDO.DLL'' version 1.21."
However, I don''t have a reference to cdo.dll; my reference is to
cdosys.dll. The user has cdosys.dll, but doesn''t have cdo.dll.

Any ideas as to what''s going on?
Try
regsvr32 cdosys.dll
b.t.w. is the cdosys.dll exactly the same on both machines?
Thanks!

Neil




I just got some more information on this, and it''s pretty interesting.

On my machine (development), I used "Microsoft CDO for Windows 2000 Library"
(cdosys.dll). Works fine.

The client using the db is in an office that uses Microsoft Exchange. On his
PC (in which there is no error and the code works fine), under references it
says, "Microsoft CDO for Microsoft Exchange" (cdoex.dll).

Now, when I delivered the database, the reference was to cdosys.dll. But
when he used it, somehow the reference got changed to cdoex.dll, though he
didn''t do anything.

So does Windows just pick which is the best cdo dll to use, based on the
configuration? Since they''re using Exchange, did it just replace the
reference to cdosys.dll with cdoex.dll? Seems kind of strange.

Anyway, getting back to the problem PC. Another PC on his LAN is the one
getting the error message. When we opened it up and looked at References, it
had two things: first was the reference to cdoex.dll, as was on the other
one; and the second was a reference to "Microsoft CDO Version 1.21"
(cdo.dll), which was indicated as "Missing."

So this PC not only changed cdosys.dll to cdoex.dll (as on the other PC),
but it also added a broken reference to cdo.dll. We removed the reference to
cdo.dll, and everything worked fine.

So, any idea as to what''s going on, why these references are being swapped
out, and where the broken reference to cdo.dll came from?

Thanks!

Neil
"Egbert Nierop (MVP for IIS)" <eg***********@nospam.invalid> wrote in
message news:%2****************@TK2MSFTNGP11.phx.gbl...

"Neil Ginsberg" <nr*@nrgconsult.com> wrote in message
news:N1****************@newsread1.news.pas.earthli nk.net...

I am using VBA/Access to send SMTP mail using CDO. I set a reference to
"Microsoft CDO for Windows 2000 Library" (cdosys.dll). Everything works
fine, both on my PC and on another PC. However, on another PC that the
database was installed on, the user is getting the message, "The project
contains a missing or broken reference to the file ''CDO.DLL'' version
1.21." However, I don''t have a reference to cdo.dll; my reference is to
cdosys.dll. The user has cdosys.dll, but doesn''t have cdo.dll.

Any ideas as to what''s going on?



Try
regsvr32 cdosys.dll
b.t.w. is the cdosys.dll exactly the same on both machines?

Thanks!

Neil



"Neil Ginsberg" <nr*@nrgconsult.com> wrote in message
news:hK****************@newsread1.news.pas.earthli nk.net...

I just got some more information on this, and it''s pretty interesting.

On my machine (development), I used "Microsoft CDO for Windows 2000 Library" (cdosys.dll). Works fine.

The client using the db is in an office that uses Microsoft Exchange. On his PC (in which there is no error and the code works fine), under references it says, "Microsoft CDO for Microsoft Exchange" (cdoex.dll).

Now, when I delivered the database, the reference was to cdosys.dll. But
when he used it, somehow the reference got changed to cdoex.dll, though he didn''t do anything.

So does Windows just pick which is the best cdo dll to use, based on the
configuration? Since they''re using Exchange, did it just replace the
reference to cdosys.dll with cdoex.dll? Seems kind of strange.

Anyway, getting back to the problem PC. Another PC on his LAN is the one
getting the error message. When we opened it up and looked at References, it had two things: first was the reference to cdoex.dll, as was on the other
one; and the second was a reference to "Microsoft CDO Version 1.21"
(cdo.dll), which was indicated as "Missing."

So this PC not only changed cdosys.dll to cdoex.dll (as on the other PC),
but it also added a broken reference to cdo.dll. We removed the reference to cdo.dll, and everything worked fine.

So, any idea as to what''s going on, why these references are being swapped out, and where the broken reference to cdo.dll came from?



You would be better off switching to late binding which doesn''t require
that you set a reference at all. This offers the following benefits.

In most cases the code becomes version independent. If you ask Windows to
create an object (for example) of "CDO.Message" then any registered library
capable of creating that object can be used.

In cases where no appropriate library exists in an application with a hard
reference you not only get an error when attempting to use that library,
but the reference marked "MISSING" will cause many built in Access
functions to fail. So for lack of an Email library, the whole app might be
rendered useless. With late binding, a PC that lacks an appropriate
library ONLY loses the abilities that the missing library provides. The
rest of the app still works just fine.
--
I don''t check the Email account attached
to this message. Send instead to...
RBrandt at Hunter dot com


这篇关于cdo.dll / cdosys.dll问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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