Sfortune Posted January 31, 2017 Share Posted January 31, 2017 I was wondering what file type you store in your data BLOB. Are you storing a specified file type or can you write the data in bytes directly to it? Please advise. Link to comment Share on other sites More sharing options...
Chronos Posted January 31, 2017 Share Posted January 31, 2017 A blob is basically anything, and it'll be stored "as-is" in SQLite. Could be a bunch of bytes, could be text or even a full blown file. The database won't know or care what it is, your program will have to deal with that. Sfortune 1 Link to comment Share on other sites More sharing options...
Sfortune Posted January 31, 2017 Author Share Posted January 31, 2017 5 minutes ago, Chronos said: A blob is basically anything, and it'll be stored "as-is" in SQLite. Could be a bunch of bytes, could be text or even a full blown file. The database won't know or care what it is, your program will have to deal with that. Â I have seen images, excel files, word documents, etc. Im just wanting to store the data of my class into it and of course read it back as needed in the proper order. I will continue to adjust the code and see the outcome. Thanks Chronos. Link to comment Share on other sites More sharing options...
jcsnider Posted January 31, 2017 Share Posted January 31, 2017 We are storing byte arrays in Intersect but as Chronos said it could be anything. You might need to store the file type (or name + extension) in another field for reconstruction purposes. BLOBS should do what you need. Link to comment Share on other sites More sharing options...
Sfortune Posted January 31, 2017 Author Share Posted January 31, 2017 2 hours ago, jcsnider said: We are storing byte arrays in Intersect but as Chronos said it could be anything. You might need to store the file type (or name + extension) in another field for reconstruction purposes. BLOBS should do what you need.  Awesome just the answer I was looking for. I create my byte array, convert my data to it, then write it. The issue i'm having now is retrieving it. I'm going to try as you said and store it in a field for reconstruction.  Figure it out. I was saving an array of classes and its properties too. I serialized it but needed to deserialize it and cast it to and object. After that I can assign it to the array with the correct properties. I think defining the length of the array helped too. But so did you guys! Thanks you can mark this one as answered. Link to comment Share on other sites More sharing options...
Recommended Posts