In order for this site to work correctly we need to store a small file (called a cookie) on your computer. Most every site in the world does this, however since the 25th of May 2011, by law we have to get your permission first. Please abandon the forum if you disagree.

Para que este foro funcione correctamente es necesario guardar un pequeño fichero (llamado cookie) en su ordenador. La mayoría de los sitios de Internet lo hacen, no obstante desde el 25 de Marzo de 2011 y por ley, necesitamos de su permiso con antelación. Abandone este foro si no está conforme.

XXXXDataSource:GetDataSet - to break

Xailer professional forum in English
Responder
Avatar de Usuario
Hurricane
Mensajes: 262
Registrado: Mar Mar 24, 2015 10:21 am
Ubicación: Brasil
Contactar:

XXXXDataSource:GetDataSet - to break

Mensaje por Hurricane »

Hi,

this method will give error (when not using DataSet for DBF).
Erro BASE/1004 Message or field name not found: TDataSet:CALIAS
Developments | Trainings | Projects
Site | E-mail | Messenger | YouTube
Avatar de Usuario
ignacio
Site Admin
Mensajes: 9246
Registrado: Lun Abr 06, 2015 8:00 pm
Ubicación: Madrid, Spain
Contactar:

Re: XXXXDataSource:GetDataSet - to break

Mensaje por ignacio »

Hi,

Please, at least, the complete error.log A tiny sample also appreciated.

Regards,
Ignacio Ortiz de Zúñiga
[Equipo de Xailer / Xailer team]
https://www.xailer.com
Avatar de Usuario
Hurricane
Mensajes: 262
Registrado: Mar Mar 24, 2015 10:21 am
Ubicación: Brasil
Contactar:

Re: XXXXDataSource:GetDataSet - to break

Mensaje por Hurricane »

Versão do Xailer: Xailer 7.1.3
Compilador: Harbour 3.2.0dev (r1912031042)
Compilador C/C++ : MinGW GNU C 7.3 (32-bit)
Plataforma Windows: Windows 10 10.0

-------------------- Informação de manejo de erro interno ---------------------

Chamada Subsistema: BASE
Código Sistema: 1004
Status por Defeito: .F.
Descrição: Message or field name not found
Operação: TSQLTable:CALIAS
Argumentos: [ 1] = Tipo: N Val: 0
Ficheiros envolvidos:
Dos Error Code: 0

Trace Through:
TSQLTABLE:CALIAS (1615)
TMARIADBDATASOURCE:GETDATASET (329)
TFORM1:BUTTON1CLICK (27)
TBUTTON:ONCLICK (0)
TBUTTON:CLICK (100)
(b)XCONTROL (156)
TBUTTON:COMMAND (0)
TSCROLLINGWINCONTROL:WMCOMMAND (275)
TFORM1:WMCOMMAND (963)
RUNFORM (0)
TAPPLICATION:RUN (289)
MAIN (16)
Adjuntos
test_GetDataSet.zip
(2.52 KiB) Descargado 62 veces
Avatar de Usuario
ignacio
Site Admin
Mensajes: 9246
Registrado: Lun Abr 06, 2015 8:00 pm
Ubicación: Madrid, Spain
Contactar:

Re: XXXXDataSource:GetDataSet - to break

Mensaje por ignacio »

Hi,

OK, Thanks,

Found the problem, it will be corrected for next release. Actual method will be moved to TDbfDataSource class. The method on the base class TDataSource will have this code:

Código: Seleccionar todo

METHOD GetDataSet( cName, cProcess ) CLASS XDataSource

   LOCAL nFor

   IF cProcess != Nil
      cProcess := Upper( cProcess )
   ENDIF

   cName := Upper( cName )

   FOR nFor := 1 TO Len( ::aDataSet )
      WITH OBJECT ::aDataSet[ nFor ]
         IF ( cProcess = Nil .OR. :cProcess == cProcess ) .AND. ( cName $ Upper( :cName )
            RETURN ::aDataSet[ nFor ]
         ENDIF
      END OBJECT
   NEXT

RETURN Nil
BTW, On SQL datasets this code will only work with tables and its name as parameter, since the property :cName holds the tablename on TSQLTable objects or the SELECT statement on TSQLQuery objects.

Regards,
Ignacio Ortiz de Zúñiga
[Equipo de Xailer / Xailer team]
https://www.xailer.com
Avatar de Usuario
ignacio
Site Admin
Mensajes: 9246
Registrado: Lun Abr 06, 2015 8:00 pm
Ubicación: Madrid, Spain
Contactar:

Re: XXXXDataSource:GetDataSet - to break

Mensaje por ignacio »

Hi,

OK, Thanks,

Found the problem, it will be corrected for next release. Actual method will be moved to TDbfDataSource class. The method on the base class TDataSource will have this code:

Código: Seleccionar todo

METHOD GetDataSet( cName, cProcess ) CLASS XDataSource

   LOCAL nFor

   IF cProcess != Nil
      cProcess := Upper( cProcess )
   ENDIF

   cName := Upper( cName )

   FOR nFor := 1 TO Len( ::aDataSet )
      WITH OBJECT ::aDataSet[ nFor ]
         IF ( cProcess = Nil .OR. :cProcess == cProcess ) .AND. ( cName $ Upper( :cName )
            RETURN ::aDataSet[ nFor ]
         ENDIF
      END OBJECT
   NEXT

RETURN Nil
BTW, On SQL datasets this code will only work with tables and its name as parameter, since the property :cName holds the tablename on TSQLTable objects or the SELECT statement on TSQLQuery objects.

Regards,
Ignacio Ortiz de Zúñiga
[Equipo de Xailer / Xailer team]
https://www.xailer.com
Responder