Hi,
I use JRDC2 for an Android application with the MYSQL database but i have difficulties for one of my request,
Is it possible to put SQL code in query parameters?
In my case, I want to create "WHERE" code in my B4A because users can add a variable number of filters
For example, we can have "WHERE (date> 2019-01-01 AND date <2019-01-02) OR (date >2019-01-07 AND date< 2019-01-09) OR ..."
I thought the easiest way was to build the sql and send it to the request as a parameter
Something like :
and B4A:
But it does not work
Someone have a solution?
Regards,
I use JRDC2 for an Android application with the MYSQL database but i have difficulties for one of my request,
Is it possible to put SQL code in query parameters?
In my case, I want to create "WHERE" code in my B4A because users can add a variable number of filters
For example, we can have "WHERE (date> 2019-01-01 AND date <2019-01-02) OR (date >2019-01-07 AND date< 2019-01-09) OR ..."
I thought the easiest way was to build the sql and send it to the request as a parameter
Something like :
SQL:
sql.selectwithfilter =SELECT * FROM table WHERE ?
and B4A:
B4X:
Dim whereCode = "date> 2019-01-01 AND date <2019-01-02) OR (date >2019-01-07 AND date< 2019-01-09)"
Dim cmd As DBCommand = CreateCommand("command", Array(whereCode))
Someone have a solution?
Regards,