Home > ASP Development > How to properly close this object

How to properly close this object



To make a long story short... Is this object being closed properly? I'm having some problems with my site and my host want's to blame it on my code, not their server... imagine that




Code:


set xml = Server.CreateObject("Microsoft.XMLHTTP")
xml.open "POST", "https://secure.authorize.net/gateway/transact.dll?" _
& PostData & "", false
xml.send ""
strStatus = xml.Status
strRetval = xml.responseText
set xml = nothing



    
Guest


Quote:
Originally Posted by wrkalot
To make a long story short... Is this object being closed properly? I'm having some problems with my site and my host want's to blame it on my code, not their server... imagine that




Code:


set xml = Server.CreateObject("Microsoft.XMLHTTP")
xml.open "POST", "https://secure.authorize.net/gateway/transact.dll?" _
& PostData & "", false
xml.send ""
strStatus = xml.Status
strRetval = xml.responseText
set xml = nothing






Try



xml.close

set xml = nothing

Was this answer helpful ? Yes No   
Guest


or even changing the object name to something like



objxml



just incase the actual wording of the current object - xml - is your nasty little prob!



all the best dude!

Was this answer helpful ? Yes No   
Guest


Thanks but it looks like .Close is not supported by this object.



Quote:
Microsoft VBScript runtime error '800a01b6'



Object doesn't support this property or method: 'Close'



/todaysfutons/secure/Auth_OrderSubmit.asp, line 75




so is "set xml = nothing" sufficient do you think?

Was this answer helpful ? Yes No   
Guest


Quote:
Originally Posted by wrkalot
Thanks but it looks like .Close is not supported by this object.







so is "set xml = nothing" sufficient do you think?




Could xml be one of those "reserved" variables like some words??

Was this answer helpful ? Yes No   
Guest
 
 
Home - About Infoqu - Contact - Privacy Statement - Link to Infoqu - Bookmark Infoqu

Copyright 2007-2008 by Infoqu. All rights reserved