An ADO.NET DataTable *can* have type information for table columns, if you add 
a parameter to the WriteXml method to have it write the schema along with the 
data. Obviously, *their* data must be typed from their source, or be inferred, 
for this to work. 

See if your provider can do this for you. If they can, you should have little 
problem reading it, assuming you're not using .Net yourself. 

> On Apr 17, 2016, at 07:02, William Drago <wdrago at verizon.net> wrote:
> 
> All,
> 
> Any thoughts on using the first byte of a BLOB to indicate what kind of data 
> that BLOB contains?
> 
> For example:
> 0 = plain old bytes
> 1 = 16 bit integers
> 2 = 32 bit integers
> 3 = singles
> 4 = doubles, etc.
> 
> I am forced to consider this approach because my function will be receiving 
> blobs but will have no idea what those blobs are. However, I can ask the 
> sender to prepend the blob with an indicator byte to provide the necessary 
> information.
> 
> In the past I have used comments in the table structure and even used custom 
> types (e.g. i16BLOB, for a blob that contains 16 bit ints), but in this case 
> I will not have access to that information. The data is coming to me in the 
> form of an ADO.NET DataTable which does not contain such information.
> 
> Of course tagging the blobs like this will increase the size of the database, 
> but not by much, and if this "feature" is not clearly documented someone in 
> the future will have a very hard time figuring out why the blobs don't make 
> sense.
> 
> Is there anything else I should be aware of?
> 
> Thanks,
> Bill
> 
> 
> 
> 
> 
> 
> _______________________________________________
> sqlite-users mailing list
> sqlite-users at mailinglists.sqlite.org
> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to