turl lock the program

Post Reply
JoseCarlos
Posts: 16
Joined: Tue Mar 07, 2006 2:02 am
Location: Guarulhos - Brasil
Contact:

turl lock the program

Post 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()
      ......
 
José Carlos
User avatar
Richard Chidiak
Posts: 946
Joined: Thu Oct 06, 2005 7:05 pm
Location: France
Contact:

Re: turl lock the program

Post 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
http://www.cbati.com

Uestudio
Fwh 13.05 Harbour 3.2 MSVC 2013
JoseCarlos
Posts: 16
Joined: Tue Mar 07, 2006 2:02 am
Location: Guarulhos - Brasil
Contact:

Re: turl lock the program

Post by JoseCarlos »

Richard

No works !
José Carlos
JoseCarlos
Posts: 16
Joined: Tue Mar 07, 2006 2:02 am
Location: Guarulhos - Brasil
Contact:

Re: turl lock the program

Post 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.
José Carlos
Post Reply