On Feb 27, 2008, at 7:35 PM, Mike McGonagle wrote: > Wow, Peter, didn't expect that anyone would go to the trouble of > writing a > program on the spot....
I didn't. :-) That was just a snippet of something I wrote for myself when I first started playing with SQLite. > Just curious, but from those few things that I have seen, it > appears that > you can only put a Blob into the DB if it is already on disc, > right? All > three examples I have seen passed the filename to the database, and > one of > them was working within a server context, so I wasn't sure how the > local > filename would be of any use to a machine that is in another part > of the > room (or anywhere else...). The insert statement has two parameters. One of them happens to be the filename and is bound as a text parameter. That's just there as a means to identify the images and allow for wildcard searches. The actual file data is loaded into memory by the code, not SQLite itself. You just bind the binary blob to the appropriate parameter with the address of the loaded data. Whether the image data was loaded from a file or fetched over a TCP connection doesn't matter, the method of storing the data is the same. Peter _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users