FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour CreateObject( "MSXML2.XMLHTTP" )
Posts: 7318
Joined: Thu Oct 18, 2012 07:17 PM
CreateObject( "MSXML2.XMLHTTP" )
Posted: Mon Jan 18, 2021 01:27 AM
I tried a test of Nageswarao

viewtopic.php?f=3&t=32519&p=191101&hilit=+strret#p191101

Code (fw): Select all Collapse
   #include "fivewin.ch"

    REQUEST DBFCDX

    function Main()

       local odoc  := CreateObject( "MSXML2.DOMDocument" )
       local ohttp := CreateObject( "MSXML2.XMLHTTP" )
       local strret

       ohttp:Open( "GET" ,"http://www.w3schools.com/angular/customers.php", .F. )
       ohttp:SetRequestHeader( "Accept"        , "application/xml")
       ohttp:SetRequestHeader( "Content-Type" ,"application/json" )
       oDoc:async := .f.
       oDoc:LoadXml('<?xml version=""1.0"" encoding=""utf-8""?>')
       ohttp:Send(oDoc:xml)
       strret := alltrim(ohttp:responseText)

       ? StrRet

    //   StrToHashArray( StrRet )
       SaveToDBF( StrRet )

    return nil

    function SaveToDBF( cStr )

       local hData

       cStr  := CharRepl( "[]", RangeRem( 1, 31, cStr ), "{}" )
       do while '" :' $ cStr
          StrTran( cStr, '" :', '":' )
       enddo
       cStr  := StrTran( cStr, '":', '"=>' )

       hData := &cStr

       if File( "download.dbf" )
          USE download.dbf NEW ALIAS DST EXCLUSIVE VIA "DBFCDX"
       else
          DBCREATE( "download.dbf", { { "NAME",    'C', 40, 0 }, ;
                                      { "CITY",    'C', 40, 0 }, ;
                                      { "COUNTRY", 'C', 40, 0 } }, ;
                    "DBFCDX", .t., "DST" )
       endif

       AEval( HGetValueAt( hData, 1 ), { |h| DBAPPEND(), FW_HashToRec( h ) } )

       XBROWSER

       CLOSE DST

    return nil




On windows 10 run ok
On Windows Seven I have this error
Code (fw): Select all Collapse
Application
===========
   Path and name: C:\Work\Errori\CREATE_OBJE_OLE\test.Exe (32 bits)
   Size: 4,072,448 bytes
   Compiler version: Harbour 3.2.0dev (r1904111533)
   FiveWin  version: FWH 20.12
   C compiler version: Borland/Embarcadero C++ 7.0 (32-bit)
   Windows version: 6.1, Build 7600 

   Time from start: 0 hours 0 mins 0 secs 
   Error occurred at: 01/18/21, 02:24:40
   Error description: (DOS Error -2147352567) WINOLE/1007  Accesso negato.
 (0x80070005): msxml3.dll
   Args:
     [   1] = C   

Stack Calls
===========
   Called from:  => TOLEAUTO:SEND( 0 )
   Called from: test.prg => MAIN( 16 )




I checked and I have this msxml3.dll on my system on c:\windows\system32 folder

How I can resolve it ?
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
Posts: 8523
Joined: Tue Dec 20, 2005 07:36 PM
Re: CreateObject( &quot;MSXML2.XMLHTTP&quot; )
Posted: Mon Jan 18, 2021 01:55 AM
Code (fw): Select all Collapse
      #IFDEF __XHARBOUR__  // xHarbour

         Try
             oServer:= CreateObject( "MSXML2.ServerXMLHTTP.6.0" )
         Catch
            MsgInfo('Erro na Criação do Serviço')
            Return Nil
         End

      #ELSE

         Try
            oServer:= win_OleCreateObject( "MSXML2.ServerXMLHTTP.5.0")
         Catch
            MsgInfo('Erro na Criação do Serviço!', 'Atenção!')
            exit
         End

      #ENDIF

      Try
         oServer:Open( "GET", URL_CONSULTA, .f. )
         oServer:SetRequestHeader( "Content-Type", "application/x-www-form-urlencoded" )
         oServer:SetRequestHeader( "Connection", "keep-alive" )
         oServer:Send()
         oServer:WaitForResponse( 10000 )
      Catch
         MsgInfo('Erro na conexão com o site!', 'Atenção!')
         exit
      End
João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
Posts: 375
Joined: Tue Feb 10, 2015 09:48 AM
Re: CreateObject( &quot;MSXML2.XMLHTTP&quot; )
Posted: Mon Jan 18, 2021 07:34 AM
are you sure that is
Code (fw): Select all Collapse
ohttp:Open( "GET" ,"http://www.w3schools.com/angular/customers.php", .F. )

and not
Code (fw): Select all Collapse
ohttp:Open( "GET" ,"https://www.w3schools.com/angular/customers.php", .F. )

with https?
Posts: 7318
Joined: Thu Oct 18, 2012 07:17 PM
Re: CreateObject( &quot;MSXML2.XMLHTTP&quot; )
Posted: Mon Jan 18, 2021 07:40 AM
AntoninoP wrote:are you sure that is
Code (fw): Select all Collapse
ohttp:Open( "GET" ,"http://www.w3schools.com/angular/customers.php", .F. )

and not
Code (fw): Select all Collapse
ohttp:Open( "GET" ,"https://www.w3schools.com/angular/customers.php", .F. )

with https?


I tried the test of Nages and on Win10 run , on win 7 no
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
Posts: 7318
Joined: Thu Oct 18, 2012 07:17 PM
Re: CreateObject( &quot;MSXML2.XMLHTTP&quot; )
Posted: Mon Jan 18, 2021 07:44 AM
karinha wrote:
Code (fw): Select all Collapse
      #IFDEF __XHARBOUR__  // xHarbour

         Try
             oServer:= CreateObject( "MSXML2.ServerXMLHTTP.6.0" )
         Catch
            MsgInfo('Erro na Criação do Serviço')
            Return Nil
         End

      #ELSE

         Try
            oServer:= win_OleCreateObject( "MSXML2.ServerXMLHTTP.5.0")
         Catch
            MsgInfo('Erro na Criação do Serviço!', 'Atenção!')
            exit
         End

      #ENDIF

      Try
         oServer:Open( "GET", URL_CONSULTA, .f. )
         oServer:SetRequestHeader( "Content-Type", "application/x-www-form-urlencoded" )
         oServer:SetRequestHeader( "Connection", "keep-alive" )
         oServer:Send()
         oServer:WaitForResponse( 10000 )
      Catch
         MsgInfo('Erro na conexão com o site!', 'Atenção!')
         exit
      End


????????

not run
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
Posts: 8523
Joined: Tue Dec 20, 2005 07:36 PM
Re: CreateObject( &quot;MSXML2.XMLHTTP&quot; )
Posted: Mon Jan 18, 2021 02:13 PM
João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
Posts: 7318
Joined: Thu Oct 18, 2012 07:17 PM
Re: CreateObject( &quot;MSXML2.XMLHTTP&quot; )
Posted: Mon Jan 18, 2021 02:23 PM

on win 7not run

Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
Posts: 7318
Joined: Thu Oct 18, 2012 07:17 PM
Re: CreateObject( &quot;MSXML2.XMLHTTP&quot; )
Posted: Tue Jan 19, 2021 10:30 AM
i formatted and reinstalled all computer
i have with windows seven 64bit and still can't get this Nages example working still i have the same problem

Code (fw): Select all Collapse
Application
===========
   Path and name: C:\work\errori\Nages_create_ole\test.Exe (32 bits)
   Size: 4,072,448 bytes
   Compiler version: Harbour 3.2.0dev (r1904111533)
   FiveWin  version: FWH 20.12
   C compiler version: Borland/Embarcadero C++ 7.0 (32-bit)
   Windows version: 6.1, Build 7600 

   Time from start: 0 hours 0 mins 0 secs 
   Error occurred at: 01/19/21, 11:27:44
   Error description: (DOS Error -2147352567) WINOLE/1007  Accesso negato.
 (0x80070005): msxml3.dll
   Args:
     [   1] = C   

Stack Calls
===========
   Called from:  => TOLEAUTO:SEND( 0 )
   Called from: test.prg => MAIN( 16 )



can you explain me how to solve this problem?
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
Posts: 8523
Joined: Tue Dec 20, 2005 07:36 PM
Re: CreateObject( &quot;MSXML2.XMLHTTP&quot; )
Posted: Tue Jan 19, 2021 10:44 AM

Do try turning off UAC and see if that resolves the issue. The issue appears to be permissions, and UAC just might be getting in the way.

João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
Posts: 7318
Joined: Thu Oct 18, 2012 07:17 PM
Re: CreateObject( &quot;MSXML2.XMLHTTP&quot; )
Posted: Tue Jan 19, 2021 11:15 AM
karinha wrote:Do try turning off UAC and see if that resolves the issue. The issue appears to be permissions, and UAC just might be getting in the way.


UAC ? where ?
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
Posts: 8523
Joined: Tue Dec 20, 2005 07:36 PM
Re: CreateObject( &quot;MSXML2.XMLHTTP&quot; )
Posted: Tue Jan 19, 2021 12:02 PM
Silvio.Falconi wrote:
karinha wrote:Do try turning off UAC and see if that resolves the issue. The issue appears to be permissions, and UAC just might be getting in the way.


UAC ? where ?


https://docs.microsoft.com/en-us/windows/security/identity-protection/user-account-control/how-user-account-control-works

https://social.technet.microsoft.com/wiki/pt-br/contents/articles/39087.habilitando-e-desabilitando-uac-controle-de-acesso-ao-usuario-via-linha-de-comando-no-windows-10.aspx

Regards.
João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM
Re: CreateObject( &quot;MSXML2.XMLHTTP&quot; )
Posted: Tue Jan 19, 2021 12:04 PM
https://www.lifewire.com/how-to-fix-msxml3-dll-not-found-or-missing-errors-2623821

Clean the Windows registry. Use a free Windows registry cleaner to remove invalid msxml3.dll registry entries that might be causing the error.
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 7318
Joined: Thu Oct 18, 2012 07:17 PM
Re: CreateObject( &quot;MSXML2.XMLHTTP&quot; )
Posted: Tue Jan 19, 2021 12:16 PM
karinha wrote:
Silvio.Falconi wrote:
karinha wrote:Do try turning off UAC and see if that resolves the issue. The issue appears to be permissions, and UAC just might be getting in the way.


UAC ? where ?


https://docs.microsoft.com/en-us/windows/security/identity-protection/user-account-control/how-user-account-control-works

https://social.technet.microsoft.com/wiki/pt-br/contents/articles/39087.habilitando-e-desabilitando-uac-controle-de-acesso-ao-usuario-via-linha-de-comando-no-windows-10.aspx

Regards.


ALL THIS DOCUMENTS YOU SENT ME ARE FOR WINDOWS 10

I HAVE PROBLEM WITH A COMPUTER HAVING WINDOWS SEVEN
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM
Re: CreateObject( &quot;MSXML2.XMLHTTP&quot; )
Posted: Tue Jan 19, 2021 12:21 PM

> I HAVE PROBLEM WITH A COMPUTER HAVING WINDOWS SEVEN

Update it to Windows 10 :-)

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 7318
Joined: Thu Oct 18, 2012 07:17 PM
Re: CreateObject( &quot;MSXML2.XMLHTTP&quot; )
Posted: Tue Jan 19, 2021 09:24 PM
Antonio Linares wrote:> I HAVE PROBLEM WITH A COMPUTER HAVING WINDOWS SEVEN

Update it to Windows 10 :-)

I cannot upgrade to win10 that pc
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com