I have one MSSql database with a table full with blob records TaEBlob (Code 'String', BlobData 'image', Size1 'Integer')
Now.... In sqllite I create a table using...
Then using the sub
When the sub finish without errors I go check the table in SQLite and I see that
I have records but all the blob fields are Null.
For example my result is something like
Code BlobData Size1
000035 BLOB 44
000042 BLOB 29
000059 BLOB 28
Why that happens?
Now.... In sqllite I create a table using...
B4X:
Starter.LocalSQL.ExecNonQuery($"CREATE TABLE IF NOT EXISTS `LOCAL_EBlob` (`Item_Code` TEXT, `BlobData` BLOB, `Size1` INTEGER)"$)
Then using the sub
B4X:
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
When the sub finish without errors I go check the table in SQLite and I see that
I have records but all the blob fields are Null.
For example my result is something like
Code BlobData Size1
000035 BLOB 44
000042 BLOB 29
000059 BLOB 28
Why that happens?