Wrox Programmer Forums
|
Beginning VB 6 For coders who are new to Visual Basic, working in VB version 6 (not .NET).
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Beginning VB 6 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old June 17th, 2003, 12:37 AM
Registered User
 
Join Date: Jun 2003
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to atingoldy Send a message via MSN to atingoldy Send a message via Yahoo to atingoldy
Default XML file access


Hi:) ..I hv a application that calls a XML file from server something like this..

Private Sub Command1_Click()
     xmlDoc.Load "http://www.abcdef.com:7001/...."
End Sub

Problem is that I wanna run this command in sync mode ..when this command tries to find the url and url is not there or server is down ..the application get hanged..
What to do with problem ??


Atin
 
Old December 10th, 2003, 09:18 AM
Authorized User
 
Join Date: Jun 2003
Posts: 50
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Before using the load statement, you could try a dummy 'push' to the address using something like:
set xmlHttp = server.CreateObject("MSXML2.xmlHttp")
    xmlHttp.Open "POST", "http://youraddress", False
    xmlHttp.setRequestHeader "Content-type", "application/xml"
    xmlHttp.send "MyDummyXML"
    retval = xmlHttp.Status
if retval = 200 then all is ok else it couldn't do it.
so if 200 then perform xmlDoc.load






Similar Threads
Thread Thread Starter Forum Replies Last Post
Access is denied" load a simple xml file nana XML 12 May 12th, 2010 07:01 AM
http addresses in xml file for Access Ribbons bgnetman XML 3 October 23rd, 2007 11:47 AM
export data from Access to XML file with VB2005 larspersoon Visual Basic 2005 Basics 2 November 25th, 2005 09:41 AM
ThePhile - Access Error to XML file cewekoolz BOOK: ASP.NET Website Programming Problem-Design-Solution 1 February 16th, 2005 02:16 AM
Simultaneous xml file access jim77002 XML 2 September 1st, 2003 03:30 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.