The three columns specified in the message should be unique. How did you create the table? Which query is failing?
I see. The error message will be available in Job.ErrorMessage.
Log("SAVE " & saver)
If job.Success = False Then
If job.ErrorMessage.Contains("org.apache.http.conn.ConnectTimeoutException:")= True Then
ToastMessageShow("FAIL TO CONNECT TO DATABASE", True)
End If
If job.ErrorMessage.Contains("java.sql.SQLException: [SQLITE_CONSTRAINT]") =True Then
Log ("HERE")
End If
Log("Error: " & job.ErrorMessage)
Logs
java.sql.SQLException: [SQLITE_CONSTRAINT] Abort due to constraint violation (columns jobnr, part, setup, mach are not unique)
SAVE 0
Error: Server Error
thanks AH
Not sure that I understand. Did you find the error message?
Log("Error: " & job.ErrorMessage)
but i cannot find fromjava.sql.SQLException: [SQLITE_CONSTRAINT] Abort due to constraint violation (columns jobnr, part, setup, mach are not unique)
Remove the reference to HttpUtils2 library and add the two code modules of HttpUtils2 (HttpJob and HttpUtils2Service). You will see where the full error message is logged.
Sub hc_ResponseError (Response As HttpResponse, Reason As String, StatusCode As Int, TaskId As Int)
If Response <> Null Then
Try
Log("HERE SQL ERROR "& Response.GetString("UTF8"))
Catch
Log("Failed to read error message.")
End Try
Response.Release
End If
CompleteJob(TaskId, False, Reason)
End Sub