Actually I can read 10 MByte from an Oracle DB (on another machine) via ODBC in less than 2 seconds... I don't know if that's good or bad though, you tell me ;) Anyway, the key idea I have for using SQLite is in the case I cannot reach the main (Oracle) database. Then I want to use SQLite as a temporary database, still communicating the same exact way as if I had the "real" connection. Makes sense? /Rob
-----Original Message----- From: Jay [mailto:[EMAIL PROTECTED] Sent: Thu 2/24/2005 8:37 PM To: Bielik, Robert Cc: Subject: RE: [sqlite] BLOB problem Won't reading multi-megabyte objects through odbc be *horribly* slow? If you're not searching the contents of the blob it's probably better stored as files with a path in the database instead. --- "Bielik, Robert" <[EMAIL PROTECTED]> wrote: > Thanks Richard, > > Ah, I see. Well I did use those functions in the ODBC driver to make > writing a blob work. However, my > current problem is reading the blob. As long as there is no null > bytes it works. But I'm very unsure of the > calling sequence. Ok, say I got a table: > > create table T_GENERICDATA (ID INTEGER, DATA BLOB); > > and I want to get to a row by select: > > select ID,DATA from T_GENERICDATA where ID=(?) > > Now the ? will be replaced by %Q by the ODBC driver > (sqlite3_vmprintf), so the resulting SQL string > put into sqlite3_prepare will be 'select ID, DATA from T_GENERICDATA > where ID='1' ' (if ID param was 1). > Ok so far so good. Then what? Should I call sqlite3_step or > sqlite3_column_blob... ? > > Eh.. pretty confused... > > TIA > /Rob > > -----Original Message----- > From: D. Richard Hipp [mailto:[EMAIL PROTECTED] > Sent: Thu 2/24/2005 3:19 PM > To: sqlite-users@sqlite.org > Cc: > Subject: Re: [sqlite] BLOB problem > > > > On Thu, 2005-02-24 at 15:05 +0100, Bielik, Robert wrote: > > Hmmm... what is this? When using sqlite3_get_table it goes through > sqlite3_exec which extracts > > values from columns with sqlite3_column_text (!!!). What about > blobs? A blob can actually contain > > a number of null bytes! What is the recommended procedure to > extract a blob if sqlite3_exec doesn't cut it?? > > > > sqlite3_get_table() and sqlite3_exec() are legacy APIs in place to > support > older programs. They are not recommended for new code. Use > instead: > > sqlite3_prepare() > sqlite3_step() > sqlite3_finalize() > > > > > ===== --------------------------------- "Lord Tarlington gazed upon the crazed Egyptian hieroglyphics on the walls of the ancient tomb of the petrified pharaoh, he vowed there would be no curse on him like on that other Lord, unless you count his marriage to Lady Tarlington who, when the lost treasure was found, will be dumped faster than that basket in the bulrushes." Melissa Rhodes --------------------------------- The Castles of Dereth Calendar: a tour of the art and architecture of Asheron's Call http://www.lulu.com/content/77264 __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com