B4J Question JRDC UPDATE error

Declan

Well-Known Member
Licensed User
Longtime User
I have a MySQL database on my server with a table "devices"
I am attempting to UPDATE field "signal" with the following code:
B4X:
                'Below SQL statement set in Config file
                'sql.set_signal_volts=UPDATE devices SET signal= ? WHERE devicemac = ?;
                Dim req As DBRequestManager = CreateRequest
                Dim cmd As DBCommand = CreateCommand("set_signal_volts", Array (sendCSQ,deviceMAC))
                Dim j As HttpJob = CreateRequest.ExecuteBatch(Array(cmd), Null)
                Wait For (req.ExecuteCommand(cmd,Null)) JobDone(j As HttpJob)
                If j.Success Then
                    Log("update_signal_volts OK")
                Else
                    Log("ERROR Update" & j.ErrorMessage)
                End If
                j.Release
I receive the following error in my B4J app:
B4X:
ResponseError. Reason: Server Error, Response: <html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1"/>
<title>Error 500 org.eclipse.jetty.io.EofException: Closed</title>
</head>
<body><h2>HTTP ERROR 500 org.eclipse.jetty.io.EofException: Closed</h2>
<table>
<tr><th>URI:</th><td>/rdc</td></tr>
<tr><th>STATUS:</th><td>500</td></tr>
<tr><th>MESSAGE:</th><td>org.eclipse.jetty.io.EofException: Closed</td></tr>
<tr><th>SERVLET:</th><td>anywheresoftware.b4j.object.JServlet-3754a4bf</td></tr>
</table>
<hr/><a href="https://eclipse.org/jetty">Powered by Jetty:// 11.0.9</a><hr/>
</body>
</html>
ResponseError. Reason: Server Error, Response: <html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1"/>
<title>Error 500 org.eclipse.jetty.io.EofException: Closed</title>
</head>
<body><h2>HTTP ERROR 500 org.eclipse.jetty.io.EofException: Closed</h2>
<table>
<tr><th>URI:</th><td>/rdc</td></tr>
<tr><th>STATUS:</th><td>500</td></tr>
<tr><th>MESSAGE:</th><td>org.eclipse.jetty.io.EofException: Closed</td></tr>
<tr><th>SERVLET:</th><td>anywheresoftware.b4j.object.JServlet-3754a4bf</td></tr>
</table>
<hr/><a href="https://eclipse.org/jetty">Powered by Jetty:// 11.0.9</a><hr/>
</body>
</html>
ERROR Update<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1"/>
<title>Error 500 org.eclipse.jetty.io.EofException: Closed</title>
</head>
<body><h2>HTTP ERROR 500 org.eclipse.jetty.io.EofException: Closed</h2>
<table>
<tr><th>URI:</th><td>/rdc</td></tr>
<tr><th>STATUS:</th><td>500</td></tr>
<tr><th>MESSAGE:</th><td>org.eclipse.jetty.io.EofException: Closed</td></tr>
<tr><th>SERVLET:</th><td>anywheresoftware.b4j.object.JServlet-3754a4bf</td></tr>
</table>
<hr/><a href="https://eclipse.org/jetty">Powered by Jetty:// 11.0.9</a><hr/>
</body>
</html>

On my server RDC app I receive the following error:
B4X:
(MySQLSyntaxErrorException) com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'signal= 30 WHERE devicemac = 'FA14BC489008'' at line 1
(EofException) org.eclipse.jetty.io.EofException: Closed

I cannot see what I am doing wrong.
I have had this error before (https://www.b4x.com/android/forum/threads/rdc-createcommand-update-error.149946/#content), but that solution does not work for me in this instance.
 

DonManfred

Expert
Licensed User
Longtime User
Upvote 1
Top