Android Question RDC ExecuteBatch issue

Harris

Expert
Licensed User
Longtime User
The code below returns: java.lang.RuntimeException: Object was not initialized on line:
DrvMod.reqManager.ExecuteBatch( commands, Null)

Can't figure out why?


EDIT: Sorry, figured out why...
Forgot to Initialize: DrvMod.reqManager.Initialize(Me, .....)

Case Closed...



B4X:
Sub AddLogRecs

Dim CusorLog As Cursor
Dim i As Int
Dim commands As List
commands.Initialize

CusorLog = DefCM.SQL3.ExecQuery("Select * from LogStats where LogSent = 0")

For i = 0 To CusorLog.RowCount - 1
  CusorLog.Position = i
  Dim cmd As DBCommand
  cmd.Initialize
  cmd.Name =  "i" & i '"add_logs"
  GetTempStat

  cmd.Parameters = Array As Object(tLogID, tLogDate,tComp_id, tLogDriver, tLogTruck, tLogTrailer, tLogType, tLogStat, tLogStatname, tLat,tLon, tLocation,tOdom, tHours, tDuration, tLogEdit, tLogReason, tLogNote, tLogSent)
  commands.Add(cmd)
  Log("added log rec: "&tLogDate&"  -  "&i)
Next

CusorLog.Close
If commands.Size > 0 Then
  DrvMod.reqManager.ExecuteBatch( commands,  Null)
End If

End Sub
 
Last edited:

Tom1s

Member
Licensed User
Longtime User
Hi

Can you help me to understand your code?
I try to send all the data from local table to remote table.
 
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
this is an old thread. start a new one for your problem
 
Upvote 0
Top