Página 1 de 1

Switching From TMySQLDatasource to TWebDataSource

Publicado: Mar Mar 28, 2023 4:00 pm
por Timm
Hi!

I would like to use TWebDataSource instead of TMySQLDatasource, but the Filter-Method results in an error:

Código: Seleccionar todo

WITH OBJECT ::oDataSetProject := ::oWebDataSource1:Table( "project" )
   :lOpen := .t.
   :Filter( ::cFilterProject )  >> #1: Xailer-TMemDataSet: Filter error: [project_active = 1 AND user_id = 'b7ThF64e']
END WITH
Using TMySQLDatasource the code works.

Regards, Timm

Re: Switching From TMySQLDatasource to TWebDataSource

Publicado: Mié Mar 29, 2023 9:25 am
por ignacio
Hi,

TMySqlDatasource uses SQL syntax for the filters, while TWebDataSouce uses Harbour code. Maybe that's the problem.

Regards,

Re: Switching From TMySQLDatasource to TWebDataSource

Publicado: Mié Mar 29, 2023 4:30 pm
por Timm
Hi Ignacio,

with Harbour code for the filter it works. Many thanks!
In addition, it seems like oDataSet:cFullName must be taken when filtering.
For example:
:Filter( "project.project_active = 1 .AND. project.project = 'xyz'" )

Regards, Timm

Re: Switching From TMySQLDatasource to TWebDataSource

Publicado: Jue Mar 30, 2023 7:29 pm
por ignacio
Hi Timm,

I will take a look. Thanks for the feedback.

Regards