Hello all,
I've been experimenting with an app that retrieves information from other SQL databases and creates a new database from the available data (like a registry of sorts). I've had some wonderful success with it when it comes to all other fields save for the Blob field type.
It seems to be an issue with detecting whether or not a Cursor.GetBlob("Field") is null or not. I've confirmed that the blob fields are NULL in the database, but when attempting to detect this, the program blows through the failsafes and hangs up on loading the bitmap (which does not exist).
I've gone through the following threads with no success:
https://www.b4x.com/android/forum/t...-sqlite-blob-is-empty-null.31406/#post-324273
https://www.b4x.com/android/forum/threads/blob-null.70887/#post-450080
It doesn't matter if I use "If Buffer=Null..." or "If Buffer.Length>0", it keeps detecting SOMETHING there. Just for kicks, I checked the Buffer.Length and it returned a 5. It seems strange that after I set Buffer=Null and then load the (confirmed) Null blob, the buffer.length is still returning 5. I've gotten around this by using "If Buffer.Length>10" and there's no issue, but it may create some problems down the road if I ever starting using some tiny, tiny .png files.
Any ideas out there about why/how a null Buffer has a .length of 5?
Fight on, my B4A brothers & sisters!
I've been experimenting with an app that retrieves information from other SQL databases and creates a new database from the available data (like a registry of sorts). I've had some wonderful success with it when it comes to all other fields save for the Blob field type.
It seems to be an issue with detecting whether or not a Cursor.GetBlob("Field") is null or not. I've confirmed that the blob fields are NULL in the database, but when attempting to detect this, the program blows through the failsafes and hangs up on loading the bitmap (which does not exist).
I've gone through the following threads with no success:
https://www.b4x.com/android/forum/t...-sqlite-blob-is-empty-null.31406/#post-324273
https://www.b4x.com/android/forum/threads/blob-null.70887/#post-450080
It doesn't matter if I use "If Buffer=Null..." or "If Buffer.Length>0", it keeps detecting SOMETHING there. Just for kicks, I checked the Buffer.Length and it returned a 5. It seems strange that after I set Buffer=Null and then load the (confirmed) Null blob, the buffer.length is still returning 5. I've gotten around this by using "If Buffer.Length>10" and there's no issue, but it may create some problems down the road if I ever starting using some tiny, tiny .png files.
Any ideas out there about why/how a null Buffer has a .length of 5?
Fight on, my B4A brothers & sisters!