inet control problem
inet control problem
inet control problem
inet control problem
inet control problem
inet control problem inet control problem inet control problem inet control problem inet control problem inet control problem inet control problem inet control problem
inet control problem inet control problem
inet control problem
Go Back  Xtreme Visual Basic Talk > > > inet control problem


Reply
 
Thread Tools Display Modes
  #1  
Old 05-13-2003, 09:11 AM
-bigfoot- -bigfoot- is offline
Newcomer
 
Join Date: May 2003
Posts: 1
Question inet control problem


I've a problem with the inet control

I want to test if a html page is alive on server
For example if this page not exist i want to retrieve the error 404


here my code :

Code:
Public Function getHeaderCode(ByVal strHeader As String) As String 
Dim chaine As String 
    chaine = strHeader 
    chaine = Left(chaine, InStr(1, chaine, vbCrLf)) 
    chaine = Mid(chaine, InStr(1, chaine, " ") + 1) 
    getHeaderCode = Left(chaine, InStr(1, chaine, " ") - 1) 
End Function 


Inet1.OpenURL ("www.google.fr") 
chaine = Inet1.GetHeader 
While Inet1.StillExecuting 
 DoEvents 
Wend 
chaine1 = getHeaderCode(chaine) 
Debug.Print chaine1 

Inet1.RequestTimeout = 4 
Inet1.OpenURL ("http://rarusraweb04.prius.jnj.com/gpt/") 
Inet1.GetHeader 
While Inet1.StillExecuting 
    DoEvents 
Wend 
Debug.Print Inet1.GetHeader 

Inet1.Cancel 
End Sub



the first debug.print return 200 (no problem)
but i can't have the second debug.print

When vb execute Inet1.OpenURL ("http://rarusraweb04.prius.jnj.com/gpt/")
(this html page is in timeout)
i've this execute error : 35761

How can get this error and treat in my program ?
Reply With Quote
  #2  
Old 05-13-2003, 12:11 PM
MindGenius MindGenius is offline
Banned
 
Join Date: Sep 2003
Location: London, United Kingdom
Posts: 392
Default

Assuming that that is the only error you get, you can put an "On Error" line, and then you can put the appropriate code.

I see you've got VB in french (like me!)
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
multi connections, one port? burningodzilla Communications 5 08-02-2005 05:04 PM
Problem with the Inet control Ilor Communications 3 03-30-2003 08:35 AM
inet control problem its_me General 8 02-10-2002 09:44 AM
WinSock vbsupernewbie Communications 1 09-12-2001 10:20 PM
Control Arrays: What, Why and How BillSoo Tutors' Corner 0 07-13-2001 12:46 PM

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
inet control problem
inet control problem
inet control problem inet control problem
inet control problem
inet control problem
inet control problem inet control problem inet control problem inet control problem inet control problem inet control problem inet control problem
inet control problem
inet control problem
 
inet control problem
inet control problem
 
-->