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.

TSQLTable error with Xailer 8.0.1

Xailer professional forum in English
Responder
Timm
Mensajes: 111
Registrado: Lun Jun 21, 2010 11:01 am

TSQLTable error with Xailer 8.0.1

Mensaje por Timm »

Hi!

Using Xailer 8.0.1 I get an error with this code (with Xailer 7 it works):

Código: Seleccionar todo

      WITH OBJECT ::oBrwProjekteInaktiv:oDataSet
         :FastEdit()
         :project_active := 1
         :FastUpdate()
      END WITH

oDataSet is build with TMySQLDatasource:Table()

Código: Seleccionar todo

   Untersystemaufruf: BASE
          Systemcode: 1004
      Default-Status: .F.
        Beschreibung: Message or field name not found
           Operation: TSQLTable:ARECORD
           Argumente:  [ 1] = Typ: N Wert: 0
 Involvierte Dateien: 
      DOS-Fehlercode: 0

Aufgerufene Programmteile:
  TSQLTABLE:ARECORD (1603)
  TMYSQLRECORDS:CURRENTWHERE (456)
  TMYSQLRECORDS:REPLACE (700)
  TMYSQLRECORDS:UPDATE (530)
  TSQLTABLE:UPDATE (564)
  TSQLTABLE:FASTUPDATE (688)
  TFORMSETUP:BTNPROJEKTREACTIVATECLICK (427)
  TBTNBMP:ONCLICK (0)
  TBTNBMP:CLICK (100)
  (b)XCONTROL (156)
  TBTNBMP:COMMAND (0)
  TBEVEL:WMCOMMAND (275)
  TFORMSETUP:SHOWMODAL (0)
  (b)TFORM1_CREATEFORM (140)
  TBTNBMP:ONCLICK (0)
  TBTNBMP:CLICK (100)
  (b)XCONTROL (156)
  TBTNBMP:COMMAND (0)
  TBEVEL:WMCOMMAND (275)
  RUNFORM (0)
  TAPPLICATION:RUN (289)
  MAIN (20)

Regards, Timm
Avatar de Usuario
ignacio
Site Admin
Mensajes: 9055
Registrado: Lun Abr 06, 2015 8:00 pm
Ubicación: Madrid, Spain
Contactar:

Re: TSQLTable error with Xailer 8.0.1

Mensaje por ignacio »

Hi,

This is the code corrected:

Código: Seleccionar todo

METHOD CurrentWhere( lOrgTable ) CLASS XMySQLRecords

   LOCAL nField, cWhere := ""

   FOR EACH nField IN ::aPKFields
      IF !Empty( cWhere )
         cWhere += " AND "
      ENDIF
      IF lOrgTable
         IF !Empty( ::cTable )
            cWhere += ::cTable + "."
         ENDIF
      ELSEIF !Empty( ::aStruct[ nField, 8 ] )
         cWhere += ::aStruct[ nField, 8 ] + "."
      ENDIF
      WITH OBJECT ::oDataset
         IF :lOnEdit
            cWhere += ::aStruct[ nField, 1 ] + "=" + ValToStr( ::aRecord[ nField ] )
         ELSE
            cWhere += ::aStruct[ nField, 1 ] + "=" + ValToStr( ::aData[ ::Recno, nField ] )
         ENDIF
      END WITH
   NEXT

RETURN cWhere
If you do not know how to correct the code, just let me know and I make things easier for you. BTW, I suggest you move to MariaDB; you just need to change the datasource, that's all. MySQL dll is not freeware, but MariaDB it is.

Regards,
Ignacio Ortiz de Zúñiga
[Equipo de Xailer / Xailer team]
https://www.xailer.com
Timm
Mensajes: 111
Registrado: Lun Jun 21, 2010 11:01 am

Re: TSQLTable error with Xailer 8.0.1

Mensaje por Timm »

Hi Ignacio,

it works with the new code, many thanks!

Mostly I use MariaDB instead of DDF now but in this case I am sticked to a web server with MySQL.

Regards, Timm
Avatar de Usuario
ignacio
Site Admin
Mensajes: 9055
Registrado: Lun Abr 06, 2015 8:00 pm
Ubicación: Madrid, Spain
Contactar:

Re: TSQLTable error with Xailer 8.0.1

Mensaje por ignacio »

Hi,

MariaDB will work even in that case

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