Página 1 de 1
XXXXDataSource:GetDataSet - to break
Publicado: Mar Nov 09, 2021 5:28 pm
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
Re: XXXXDataSource:GetDataSet - to break
Publicado: Mié Nov 10, 2021 1:10 pm
por ignacio
Hi,
Please, at least, the complete error.log A tiny sample also appreciated.
Regards,
Re: XXXXDataSource:GetDataSet - to break
Publicado: Mié Nov 10, 2021 3:42 pm
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)
Re: XXXXDataSource:GetDataSet - to break
Publicado: Mié Nov 10, 2021 6:16 pm
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,
Re: XXXXDataSource:GetDataSet - to break
Publicado: Mié Nov 10, 2021 6:16 pm
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,