Archived Boards > COM Automation and dotNet

XMLHTTP Issue

(1/2) > >>

JTaylor:
Hoping someone can help me see what I am apparently doing wrong that is so simple I can't find it after 6 or so hours.

I make a call to a webservice and retrieve a list of items.  When I launch the WinBatch script it works as expected.

If I upload a list it works fine as I can open the table in the admin tool and query the table and all is good.  I can also make the call via  web browser that I am making in the script and it returns all the records.

The catch is that after the first load when launching the script it only returns the same list no matter how many new items I upload within the script.  Again, everything outside the script returns what is expected.  I even copy/paste the URL during the process so I am using the exact same link in the browser but the browser and the script return different results.   If I close the script and reopen then it returns all the records as expected.  I do a lot of this type of stuff and haven't ever encountered such a  problem and, so far, can't see what I could be doing wrong.

Suggestions?

Jim



--- Code: Winbatch ---

  SQLText = "truncate table import"
  myConn.Execute(SQLText)

  ' Create MSXML Object
  MSXML = CreateObject("MSXML2.XMLHTTP")

  XMLURL = "https://www.myserver.com/webcgi/webbatch.exe?test/get.web&action=GET&domain=mydomain"
  ret = MSXML.Open("GET", XMLURL, @FALSE)
  MSXML.Send
  Display(1,"Selections","Importing ...")
  xtxt = MSXML.ResponseText

  ObjectClose(MSXML)
 
  If StrIndexNC(xtxt,"Insert into",0,@FWDSCAN) > 0 Then myConn.Execute(xtxt)

 

td:
Other than a missing closing single quote, nothing jumps out as problematic.

JTaylor:
Interesting...my mind has always registered those as Comments over the many years I've used that piece of code in many different places  :)   

Unfortunately that wasn't the problem.   Wonder what the food will be like in the asylum or if the drugs will make me not care?

Jim

td:
Didn't mean to imply that the missing quote was the 'cause' because obviously is not given how the WIL parser works.  And a missing closing quote is not the same thing as a comment to the parser nor to syntax colorizers. 

JTaylor:
I know.  I just found it interesting how I never thought about that being anything other than a Comment, even though, from a WB coding point of view, it obviously isn't.

Jim

Navigation

[0] Message Index

[#] Next page

Go to full version