Page 1 of 1

turl lock the program

Posted: Fri Oct 09, 2009 7:32 pm
by JoseCarlos
I am using xHarbour 1.1 and when I use TURL the program locks on the first line

Code: Select all

   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()
      ......
 

Re: turl lock the program

Posted: Fri Oct 09, 2009 8:29 pm
by Richard Chidiak
Try it this way, it works for me

Code: Select all


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

Re: turl lock the program

Posted: Sat Oct 10, 2009 12:06 am
by JoseCarlos
Richard

No works !

Re: turl lock the program

Posted: Sat Oct 10, 2009 1:58 am
by JoseCarlos
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.