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...
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: