FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour turl lock the program
Posts: 16
Joined: Tue Mar 07, 2006 02:02 AM
turl lock the program
Posted: Fri Oct 09, 2009 07:32 PM
I am using xHarbour 1.1 and when I use TURL the program locks on the first line

Code (fw): Select all Collapse
   oUrl:=turl():New("http://www.ntsinfo.com.br/ntsbuscacep/searchxml.php?cep=07197250&tipoPesq=cep")
   cUrl:="http://www.ntsinfo.com.br/ntsbuscacep/searchxml.php?cep=07197250&tipoPesq=cep"
   opg := TipClientHttp():New( oUrl ,.t.)
   opg:nConnTimeout := 20000
   MsgRun("Pesquisando C.E.P.: "+Transform(fCEP,"@R 99.999-999")+".Aguarde...")
   if opg:Open( cUrl )
      cBuf := opg:readAll()
      ......
José Carlos
Posts: 946
Joined: Thu Oct 06, 2005 07:05 PM
Re: turl lock the program
Posted: Fri Oct 09, 2009 08:29 PM
Try it this way, it works for me

Code (fw): Select all Collapse
cURL := if( empty(cURL), "http://www.xxxx.com/", cURL )
oUrl := tURL():New( cURL )
if !empty( oUrl )
   oClient := tIPclienthttp():new( oUrl )
   if !empty( oClient )
      oClient:nConnTimeOut := 20000
      if oClient:Open( oUrl )
         .....


HTH

Richard
http://www.cbati.com

Uestudio
Fwh 13.05 Harbour 3.2 MSVC 2013
Posts: 16
Joined: Tue Mar 07, 2006 02:02 AM
Re: turl lock the program
Posted: Sat Oct 10, 2009 12:06 AM

Richard

No works !

José Carlos
Posts: 16
Joined: Tue Mar 07, 2006 02:02 AM
Re: turl lock the program
Posted: Sat Oct 10, 2009 01:58 AM

To use the command below which need to link lib

TipClientHttp():New(TURL():New(cUrl))

I tried xHarbour 1.1.0 and 1.2.1 and the program crashes.

José Carlos

Continue the discussion