Android Question [Solved] jRDC2 problem with date parameter


Licensed User
Hello guys,
I have a Firebird DB on my server, all runs OK, all querys run OK,
but I have a little problem when I try to set a string parameter tha contains a date.
This is the error message:

Error 500 org.firebirdsql.jdbc.field.TypeConversionException: Error converting to object.

in (on server side):
sql.menu_data_select=SELECT DISTINCT( As data1 FROM plan_corsi, attivita WHERE >= ? AND attivita.cod_club = ? AND plan_corsi.cod_attivita = attivita.id_attivita ORDER BY

and this is the code:

Sub Activity_Create(FirstTime As Boolean)
    data_server = "2023-02-16 00:00:00"
    cod_club = "001"

    ExecQuery("menu_data_select", Array(data_server, cod_club))
End Sub

' this query should be returns a series of records with a single field (DATA1) starting from the one passed as a parameter
Sub ExecQuery(sql_cmd As String, value As Object)

    Dim req As DBRequestManager = CreateRequest
    Dim cmd As DBCommand = CreateCommand(sql_cmd, Array(value))

    Wait For (req.ExecuteQuery(cmd, 0, Null)) JobDone(j As HttpJob)
    If j.Success Then
        req.HandleJobAsync(j, "req")
        Wait For (req) req_Result(res As DBResult)
        For Each row() As Object In res2.rows
            s = row(res2.Columns.Get("DATA1"))
            s = NumberFormat2(DateTime.GetDayOfMonth(s), 2, 0, 0, False)&"-"&NumberFormat2(DateTime.GetMonth(s), 2, 0, 0, False)&"-"&NumberFormat2(DateTime.GetYear(s), 4, 0, 0, False)

        Log(sql_cmd&": OK")
        'Log(sql_cmd&" ERROR: " & j.ErrorMessage)

    End If
End Sub

Same error message if I set an object array:

Dim a() As String
a = Array As String (data_server, cod_club)
Dim par As List = a

ExecQuery("menu_data_select", par)

what am I doing wrong?
Last edited: