[sqlite] Storing Images in Blobs - Best Practices

2016-02-18 Thread Paul Sanderson
How do you know that it is sqlite that is corrupting the images, could your conversion to nsdata (or elsewhere prior to writing to teh DB) be the culprit? Given your schema if a record has become corrupt then the following two columns (the data for which which would be stored contiguously after th

[sqlite] Storing Images in Blobs - Best Practices

2016-02-18 Thread Teg
Hello Joe, I'm inclined to think the problem is in the client side too. I store many GB's of images as blobs and have no issues. It sounds like you're re-using a buffer before the insert has completed. I'd wonder if it's related to how you're binding the parameters to the update. Assumin

[sqlite] Storing Images in Blobs - Best Practices

2016-02-17 Thread Simon Slavin
On 17 Feb 2016, at 10:23pm, Rooney, Joe wrote: > 1. The database table has four fields: Employee GUID (varchar), EmployeePic > (Blob), isPicAvail (Bool) and picDate (int). Store the BLOB field at the end of the row. This will make accessing the two fields currently after it faster. > I us

[sqlite] Storing Images in Blobs - Best Practices

2016-02-17 Thread Rooney, Joe
I've wanted to use SQLite Blobs for storing images for some time, and a new update to an iOS app gave me the opportunity - our Corporate Directory mobile app. I had considered it a few years before but after reading some posts that suggested a better way was to store links in SQLite and the imag