Error al migrar a HARBOUR

Error al migrar a HARBOUR

Postby Adolfo » Tue Dec 22, 2009 9:55 pm

Hola a todos...

Tengo la necesidad de utilizar el RDD SIX, para preguntar por unos datos mientras por otro lado trabajo con MYSQL y ADO.
Utilizaba xHarbour y no tenia problemas, pero frente a la necesidad de acceder a esos datos antiguos con SIX, migre un sistema a HARBOUR.. todo bien..pero tengo un error que no logro descrifrar.

Es mismo codigo funciona en xHarbour pero no en HARBOUR.. adjunto codigo y error.


Code: Select all  Expand view

Local oErrorAdo
           TRY
                    oDatos:oRcs:Skip()
           CATCH
              FOR EACH oErrorAdo IN oDatos:oCon:Errors
                    ShowError(oErrorAdo)
              NEXT
           END
 


El Error es
    Application
    ===========
    Path and name: C:\SQL\TELE\TELE.Exe (32 bits)
    Size: 3,573,760 bytes
    Time from start: 0 hours 0 mins 10 secs
    Error occurred at: 22/12/2009, 18:41:24
    Error description: Error BASE/3012 Argument error: __OLEENUMCREATE
    Args:
    [ 1] = P
    [ 2] = L .F.

    Stack Calls
    ===========
    Called from: => __OLEENUMCREATE(0)
    Called from: ../../../oleauto.prg => WIN_OLEAUTO:__ENUMSTART(0)
    Called from: adobase.prg => TADOBASE:SAVE(1199)
    Called from: CLIENTE.prg => ACTCTACLI(607)
    Called from: VENTAS.prg => VALIDACLIENTE(249)


La linea causante (1199 ) es esta

FOR EACH oErrorAdo IN oDatos:oCon:Errors


Cualquier ayuda sera bienvenida..
Utilizo Harbour 2.0 Beta 3 y FWH907

Desde Chile
Adolfo
;-) Ji,ji,ji... buena la cosa... "all you need is code"

http://www.xdata.cl - Desarrollo Inteligente
----------
Asus TUF F15, 32GB Ram, 2 * 1 TB NVME M.2, GTX 1650
User avatar
Adolfo
 
Posts: 852
Joined: Tue Oct 11, 2005 11:57 am
Location: Chile

Re: Error al migrar a HARBOUR

Postby Daniel Garcia-Gil » Tue Dec 22, 2009 11:38 pm

Hola Adolfo...

he probado tu codigo, me da el mismo error con ambos compiladores

cuando se produce un error se genera un objeto "Error" por tal accederia al objeto de esta manera

esto es simplemente un test, se ejecuta perfectamente en ambos compiladores, pruebalo y nos comentas
Code: Select all  Expand view

#include "Fivewin.ch"
#include "ado.ch"

FUNCTION MAIN()
local oCon, lOk
 
lOk:=.t.
 
 if lOk
    TRY
       oCon:=TOleAuto():new("ADODB.Connection")
     
       
    CATCH oErroraDo
       ErrorCatch( oErrorAdo, "Error en OLE" )
    END
     
     
    TRY      
       oCon:connectionString := "Driver={MySQL ODBC 5.1 Driver};Server=EQUIPO;Port=3306;Database=test;User=root; Password=12345678;Option=3;"
       oCon:open()
    CATCH oErrorAdo

       ErrorCatch( oErrorAdo,"Error en OPEN"  )
       return .f.
    END
   
 endif
return nil

Function ErrorCatch( oError, cTitle )

   LOCAL cMensagemRetorno := ""
   local cArg, cArgs := ""

   if ValType( oError:Args ) == "A"
      for each cArg in oError:Args
         cArgs += cValToChar( cArg ) + CRLF
      NEXT
   endif
   cMensagemRetorno := "[Subsystem]"         + oError:SubSystem                 + CRLF +;
                       "[SubCode]"           + alltrim( str( oError:SubCode ) ) + CRLF +;
                       "[Operacion]"         + oError:Operation                 + CRLF +;
                       "[Descripcion]"       + oError:Description               + CRLF +;
                       "[Argumentos]"        + cArgs

RETURN( msgStop( cMensagemRetorno, cTitle ) )
 
User avatar
Daniel Garcia-Gil
 
Posts: 2365
Joined: Wed Nov 02, 2005 11:46 pm
Location: Isla de Margarita

Re: Error al migrar a HARBOUR

Postby Adolfo » Wed Dec 23, 2009 11:30 am

Daniel

Gracias.. Pruebo y te comento...

Desde Chile
Adolfo
;-) Ji,ji,ji... buena la cosa... "all you need is code"

http://www.xdata.cl - Desarrollo Inteligente
----------
Asus TUF F15, 32GB Ram, 2 * 1 TB NVME M.2, GTX 1650
User avatar
Adolfo
 
Posts: 852
Joined: Tue Oct 11, 2005 11:57 am
Location: Chile


Return to FiveWin para Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 40 guests