Sub EBlobInsert As ResumableSub
Wait For (Connect) Complete (Success As Boolean)
If Success Then
Try
Dim Qry As String
Qry = $"SELECT Code, BlobData, Size1 FROM TaEBlob"$
Dim sf As Object = RemoteSQL.ExecQueryAsync("RemoteSQL", Qry, Null)
Wait For (sf) RemoteSQL_QueryComplete (Success As Boolean, Crsr As JdbcResultSet)
If Success Then
Dim i1 As Int = 1
Do While Crsr.NextRow
LocalSQL.ExecNonQuery2($"INSERT INTO LOCAL_EBlob (Item_Code, BlobData, Size1)
VALUES (?, ?, ?)"$, Array As Object(Crsr.GetString("Code"), Crsr.GetBlob("BlobData"), Crsr.GetInt("Size1")))
i1 = i1 +1
Sleep(0)
Loop
Crsr.Close
End If
Catch
Success = False
Log(LastException)
End Try
CloseConnection
End If
Return Success
End Sub