i am using this function to get an update some fields in de mysql server
does not give me any error but does not update de table.
if any one have the proper way to compair varbinary on mysql server.
thanks
victor
B4X:
Try
Dim rs As ResultSet
'Dim sql_que_data As String = $" Select c.id As CASEID from GMT.Dispositivos d inner join GMT.Perfiles p on d.ID = p.DeviceID inner join GMT.Casos c on c.ProfileID = p.ID where d.imei = ${imei}"$
Dim sql_que_data As String = $"Select c.ID As CASO from GMT.Dispositivos d inner join GMT.Asociacion_Dispositivos ad on ad.PanicbuttonID = d.ID inner join GMT.Perfiles p on p.DeviceID = ad.ShacklesID inner join GMT.Casos c on c.ProfileID = p.ID where d.imei = ${imei}"$
Log(sql_que_data)
rs = Main.sql1.ExecQuery(sql_que_data)
Do While rs.NextRow
Dim Buffer() As Byte
Buffer = rs.GetBlob("CASO")
If rs.GetString("CASO").Length > 0 Then
Try
Dim sql_update As String = "UPDATE Ubicacion set lat = ?,lon=? where caseID = ?"
Dim sql_update2 As String = $"UPDATE Ubicacion set lat = ${lattitude},lon=${longitude} where caseID = ${Buffer}"$
Log(sql_update2)
Dim Params As List
Params.Initialize
Params.Add(lattitude)
Params.Add(longitude)
Params.Add(Buffer)
Main.sql1.ExecNonQuery2(sql_update, Params)
Catch
LogError(LastException)
Return
End Try
Else
Log("CaseID ELSE ->"&rs.GetString("CASO"))
End If
Loop
Catch
Log(LastException)
End Try
does not give me any error but does not update de table.
if any one have the proper way to compair varbinary on mysql server.
thanks
victor
Last edited: