I am uploading data from an SQLite database on a tablet to an SQL Server database on the LAN using DBRequestManager.
I have set query in the config.properties like this:
sql.insert_deliveryhistory=INSERT INTO [DeliveryHistory] ([del_pk],[del_rndfk],[del_time],[del_dspfk],[del_receivedby],[del_delivered],[del_scancode]) VALUES (?, ? , ?, ?, ?, ?, ?)
This is my code:
When the code runs I get an error in my JobDone code:
java.sql.SQLException: The executeUpdate method must not return a result set.
Can anyone point out what I am doing wrong, please?
I have set query in the config.properties like this:
sql.insert_deliveryhistory=INSERT INTO [DeliveryHistory] ([del_pk],[del_rndfk],[del_time],[del_dspfk],[del_receivedby],[del_delivered],[del_scancode]) VALUES (?, ? , ?, ?, ?, ?, ?)
This is my code:
B4X:
Dim deliveries As List
deliveries = DBUtils.ExecuteMemoryTable(SQLLite, "SELECT [del_pk],[del_rndfk],[del_time],[del_dspfk],[del_receivedby],[del_delivered],[del_scancode] FROM DeliveryHistory", Null, 0)
Dim commands As List
commands.Initialize
For i = 0 To deliveries.Size - 1
Dim cmd As DBCommand
cmd.Initialize
cmd.Name = "insert_deliveryhistory"
cmd.Name = "select_runsheetdetails"
Dim delivery() As String
delivery = deliveries.Get(i)
cmd.Parameters = Array As Object(delivery(0), delivery(1), delivery(2), delivery(3), delivery(4), delivery(5), delivery(6))
' cmd.Parameters = Array As Object(delivery)
commands.Add(cmd)
Next
reqManager.ExecuteBatch(commands, "Upload")
When the code runs I get an error in my JobDone code:
java.sql.SQLException: The executeUpdate method must not return a result set.
Can anyone point out what I am doing wrong, please?