[sqlite] Please confirm what I THINK I know about blobs

2015-05-09 Thread Simon Slavin
On 9 May 2015, at 8:12pm, Drago, William @ CSG - NARDA-MITEQ wrote: > Best idea yet! Anyone see any issues with this? It's actually a comment, and SQLite provides ways of putting proper comments in table definitions: CREATE TABLE blob_table ( ModelNo TEXT, -- new-style models as used from

[sqlite] Signal handling and mmap

2015-05-09 Thread James K. Lowden
On Tue, 5 May 2015 12:05:51 -0700 Charles Munger wrote: > At https://www.sqlite.org/mmap.html, the documentation mentions: > > "An I/O error on a memory-mapped file cannot be caught and dealt with > by SQLite. Instead, the I/O error causes a signal which, if not > caught by the application,

[sqlite] Please confirm what I THINK I know about blobs

2015-05-09 Thread Drago, William @ CSG - NARDA-MITEQ
> -Original Message- > From: sqlite-users-bounces at mailinglists.sqlite.org [mailto:sqlite- > users-bounces at mailinglists.sqlite.org] On Behalf Of Eric Hill > Sent: Saturday, May 09, 2015 2:14 PM > To: General Discussion of SQLite Database > Subject: Re: [sqlite] Please confirm what I

[sqlite] Multiple Prepared Statements

2015-05-09 Thread Kees Nuyt
On Fri, 08 May 2015 14:49:54 -0700, Scott Doctor wrote: > Can I prepare multiple statements then implement them in > arbitrary order (based on some logic)? Yes. > Or do the statements need to be prepared, stepped, finalized > serially? No. You even don't have to _finalize() the statement,

[sqlite] Bug: sqlite3_memory_used/highwater truncate to 32 bits

2015-05-09 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 The sqlite3_memory_used and highwater interfaces are defined to return a 64 bit value. They carefully call the 32 bit limited sqlite3_status method and then cast to 64 bit. Instead they should call sqlite3_status64. Reported indirectly via

[sqlite] Please confirm what I THINK I know about blobs

2015-05-09 Thread Eric Hill
The comment approach could work, I guess, but why not just encode the type into the column's declared type? CREATE TABLE blob_table ( ModelNo TEXT, SerialNo TEXT, VSWR BLOB_DOUBLE ) That's what I do with numeric columns that I need to identify as actually containing dates. As I

[sqlite] Please confirm what I THINK I know about blobs

2015-05-09 Thread Eduardo Morras
On Sat, 09 May 2015 06:09:41 -0400 William Drago wrote: > All, > > Say you encounter a blob in a database. There's no way to > tell if that blob carries bytes, floats, doubles, etc, correct? > > Assuming the above is true, then is it always prudent to > store some metadata along with your

[sqlite] Please confirm what I THINK I know about blobs

2015-05-09 Thread William Drago
On 5/9/2015 6:40 AM, Eduardo Morras wrote: > On Sat, 09 May 2015 06:09:41 -0400 > William Drago wrote: > >> All, >> >> Say you encounter a blob in a database. There's no way to >> tell if that blob carries bytes, floats, doubles, etc, correct? >> >> Assuming the above is true, then is it always

[sqlite] VBA Sqllite blob data

2015-05-09 Thread William Drago
You may find what you need here: https://sqliteforexcel.codeplex.com/ Good luck, -Bill On 5/8/2015 3:15 PM, Preston King wrote: > Does anyone have an example of how to read sqlite blob records, that are not > pictures, into Excel? I have been trying to find some VBA code to do this but > am

[sqlite] Please confirm what I THINK I know about blobs

2015-05-09 Thread Richard Hipp
On 5/9/15, William Drago wrote: > All, > > Say you encounter a blob in a database. There's no way to > tell if that blob carries bytes, floats, doubles, etc, correct? As far as SQLite is concerned, a BLOB is just bytes. The interpretation of those bytes (as floats, doubles, a JPEG thumbnail, a

[sqlite] Please confirm what I THINK I know about blobs

2015-05-09 Thread William Drago
All, Say you encounter a blob in a database. There's no way to tell if that blob carries bytes, floats, doubles, etc, correct? Assuming the above is true, then is it always prudent to store some metadata along with your blobs so that they can be identified in the future? Example table:

[sqlite] Please confirm what I THINK I know about blobs

2015-05-09 Thread Scott Doctor
My design philosophy is that if I have to think about what something is, then that thought is a piece of information that should accompany the blob. Consider ten years from now when someone else is looking at the database for the first time. Will they know what is in that blob? Column names

[sqlite] Please confirm what I THINK I know about blobs

2015-05-09 Thread Darren Duncan
In addition to this, where a BLOB represents something that could often be a file on a disk, methods used to identify the types of those files could often be used. For example, with many binary file types the first few bytes of the file are signatures for its type, eg with JPEG files for

[sqlite] Multiple Prepared Statements

2015-05-09 Thread Simon Slavin
On 8 May 2015, at 11:40pm, Scott Doctor wrote: > So if I have a loop that finds a row with some data (statement1) > then based on values from that row sets fields in other rows > statement2 find a row to set new data > statement3 set column to something, > repeat n times. > then go back and do

[sqlite] Determine type of prepared statement via C Interface?

2015-05-09 Thread Stephan Beal
On Fri, May 8, 2015 at 7:01 PM, Stephen Broberg wrote: > (e.g., insert, update, delete, select, etc.). Specifically, I?d like to > know whether a statement that either has run or is about to be run (via > sqlite3_step) is a read-only (select) or write (pretty much everything > else) operation.