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

查看:180
本文介绍了使用Microsoft Internet传输控制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,对象不支持此属性或方法的低于code中的最后一行。

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传输控制

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

如果任何人能帮助这将是AP preciated。

If any one can help it would be appreciated.

干杯

诺埃尔

编辑: 起初我还以为这个错误只happend在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控件。在code会是这个样子:

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

我有这种类型的code工作在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传输控制6.0时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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