turl lock the program

turl lock the program

Postby JoseCarlos » Fri Oct 09, 2009 7:32 pm

I am using xHarbour 1.1 and when I use TURL the program locks on the first line

Code: Select all  Expand view

   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
JoseCarlos
 
Posts: 16
Joined: Tue Mar 07, 2006 2:02 am
Location: Guarulhos - Brasil

Re: turl lock the program

Postby Richard Chidiak » Fri Oct 09, 2009 8:29 pm

Try it this way, it works for me

Code: Select all  Expand view


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
User avatar
Richard Chidiak
 
Posts: 946
Joined: Thu Oct 06, 2005 7:05 pm
Location: France

Re: turl lock the program

Postby JoseCarlos » Sat Oct 10, 2009 12:06 am

Richard

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

Re: turl lock the program

Postby JoseCarlos » Sat Oct 10, 2009 1: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
JoseCarlos
 
Posts: 16
Joined: Tue Mar 07, 2006 2:02 am
Location: Guarulhos - Brasil


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 88 guests