使用 Microsoft Internet Transfer Control 6.0 时出错 [英] Error when using Microsoft Internet Transfer Control 6.0

查看:41
本文介绍了使用 Microsoft Internet Transfer Control 6.0 时出错的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的访问应用程序中使用上述内容时,我似乎在 Windows 7(32 位)上遇到了问题.

I seem to have run into a problem on windows 7 (32bit) when using the above in my access application.

我在以下代码的最后一行收到错误438",对象不支持此属性或方法".

I get the error '438', "Object doesn't support this property or method" on the last line of the below code.

strURL = "https://www.google.com/accounts/ClientLogin"
strFormData = "Email=" & myEmail & "&Passwd=" & myPassword & "&source=" & mySource &    "&service=cl&accountType=HOSTED_OR_GOOGLE"
strHeaders = "Content-Type:application/x-www-form-urlencoded"
Inet1.Execute strURL, "POST", strFormData, strHeaders

我已经成功(我相信)使用命令行提示符和regsvr32 msinet.ocx"添加了 MSINET.OCX,并且我已经引用了 Microsoft Internet Transfer Control

I've succesfully (i believe) added MSINET.OCX using the command line prompt and 'regsvr32 msinet.ocx' and i've referenced Microsoft Internet Transfer Control

显然,我不确定在这里做什么以及我需要做什么来解决在 Windows 7 中出现的问题

Obviously I'm not to sure what to do here and what I need to do to fix that problem that has manifested itself in Windows 7

如果有人能提供帮助,我们将不胜感激.

If any one can help it would be appreciated.

干杯

诺尔

最初我认为这个错误只发生在 Win 7 上,而不是 XP,但是我回到 XP 机器上,它重复了同样的问题.不知道为什么因为它以前不存在,某处播放不正确.

Initially I thought this error only happend on Win 7, as opposed to XP, however i went back to an XP machine and it is repeating the same problem. Do not know why as it didnt exist before, something somewhere is not playing right.

已解决:不知道为什么我遇到了上述问题.设法回滚到旧版本并开始工作.尽管据我所知,两种形式背后的编码没有区别.我无法解释我一生的问题是什么!

Resolved: Have no idea why I had the problems above. Managed to roll back to an older version and it began to work. Although as far as i can see there are no differences in the coding behind both forms. I can not explain what the problem was for the life of me!

推荐答案

通常的方法是使用 MS XMLHTTP 对象,而不是非本地 ActiveX 控件.代码看起来像这样:

The usual way to do this is to use the MS XMLHTTP object, rather than a non-native ActiveX control. The code would look something like this:

  Dim oHTTP as Object

  strURL = "https://www.google.com/accounts/ClientLogin"
  strFormData = "Email=" & myEmail & "&Passwd=" & myPassword & "&source=" & mySource & "&service=cl&accountType=HOSTED_OR_GOOGLE"
  strHeaders = "Content-Type:application/x-www-form-urlencoded"
  Set oHttp = CreateObject("MSXML2.XMLHTTP")
  oHTTP.Open "POST", strURL & strFormData, True
  oHTTP.setRequestHeader "Content-Type", strHeaders
  oHTTP.send vbNullString

我已经在 Win2000、WinXP 和 Win7 64 位上运行了这种类型的代码,没有问题.由于它使用后期绑定,如果安装/注册XMLHTTP库有问题,它是可捕获的,但我从未遇到过.

I have had this type of code working on Win2000, WinXP and Win7 64-bit without problems. Since it uses late binding, should there be a problem with the installation/registration of the XMLHTTP library, it's trappable, but I've never encountered one.

这篇关于使用 Microsoft Internet Transfer Control 6.0 时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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