I was able to execute the query by passing the AnotherDatePicker parameter. But the query returns empty filtering by the date entered, but there is data in the database, from my back I query successfully. What could be wrong with this query? And how do I test the result of a jdbcresult?, if it is empty?
Try
Dim sqlquery As String
DateTime.DateFormat = "yyyyMMdd"
Private sDate = DateTime.Date(dtp1.date) As String
Log(sDate)
sqlquery = "select count(distinct(pedido)) as qtped, sum(qtde * valor) as valped from itens_pedido where data = '" & sDate & "'"
sqlquery= sqlquery & " and status= 'P' "
Dim SenderFilter As Object = conexao.sql1.ExecQueryAsync("SQL", sqlquery, Null)
Wait For (SenderFilter) SQL_QueryComplete (Success As Boolean, rs As JdbcResultSet)
If Success Then
If rs.NextRow Then
Do While rs.NextRow