Hi, I am trying to develop a simple secondary activity Feedback form where user will simply put there feedback and press sent to send the data to remote mysql database with jrdc. Problem is after sending data my activity automatically crashes with java.net.SocketTimeoutException and back to main activity. I checked my database, Data inserted successfully. Following are the code that i am using for sending data ... What did I do wrong.
B4X:
Sub cmdSend_Click
If txtFeedback.Text = "" Then
Msgbox("You Didn't Give Any Feedback To Submit !!!", "No Feedback")
Else
Dim cmd As DBCommand
cmd.Initialize
cmd.Name = "insert_feedback"
If spnType.SelectedItem = "FEEDBACK" Then
cmd.Parameters = Array As Object(txtFeedback.Text, 2, Starter.USER_ID)
Else If spnType.SelectedItem = "COMPLAIN" Then
cmd.Parameters = Array As Object(txtFeedback.Text, 1, Starter.USER_ID)
End If
Starter.reqManager.ExecuteCommand(cmd, "F")
End If
End Sub
Sub JobDone(Job As HttpJob)
If Job.Success = False Then
Log("Error: " & Job.ErrorMessage)
Else
If Job.JobName = "DBRequest" Then
Dim result As DBResult = Starter.reqManager.HandleJob(Job)
Starter.sqlLiteDB.BeginTransaction
Try
Catch
MsgboxAsync("Error Occured When Updating Data !!!" & Job.ErrorMessage, "Error")
' Log(LastException.Message & records(result.Columns.Get(0)))
End Try
Starter.sqlLiteDB.EndTransaction
End If
End If
Job.Release
Activity.Finish
End Sub