Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

-2147221231 Automation error

Status
Not open for further replies.

DeltaTech

Programmer
Apr 16, 2003
92
MY
Hi
I am using XML with my VB app, and everything works fine on the development PC which runs on XP Pro.
When I install it on a test PC running WinME though it gives me the above error.
The error occurs on this line of code:
Code:
Dim objXMLHTTP As xmlHTTP
Dim xmlHTTP As MSXML2.ServerXMLHTTP30
Dim xmlDoc As MSXML2.DOMDocument30

    Set xmlDoc = New MSXML2.DOMDocument30

    'Error occurs here
    [red]Set xmlHTTP = New MSXML2.ServerXMLHTTP30[/red]
Can anyone help please?
Thanks in advance.
[bigcheeks]

 
Try rather this?
[tt]>Dim xmlHTTP As MSXML2.ServerXMLHTTP30
Dim xmlHTTP As Microsoft.XMLHTTP
>Set xmlHTTP = New MSXML2.ServerXMLHTTP30
Set xmlHTTP = New Microsoft.XMLHTTP[/tt]

You may find win9x series not supporting msxml2.serverxmlhttp class.
 
Hi tsuji
Thanks for this, but does this mean that I have to reference a new/different DLL?
[bigcheeks]
 
Can make the same reference to
[tt]Microsoft XML, v3.0[/tt]
as you seem to making version dependent domdocument. In that case, type it like this.
[tt]Dim xmlHTTP As MSXML2.xmlHTTP
Set xmlHTTP = New MSXML2.xmlHTTP[/tt]
The dll in question is targetted to msxml3.dll.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top