Re: [sqlite] Updating a BLOB field

2008-06-19 Thread Dennis Cote
flakpit wrote:
> 
> The SQL to insert the blob into my database is :
> 
> "INSERT INTO archive (docnumber, document) VALUES (?,?)"
> 
> How to change the syntax to update a blob field? Is it the same as updating
> normal data or a variant on the above?

You can replace the data using an replace statement (an abbreviation of 
insert or replace) assuming that docnumber is the primary key.

   replace into archive (docnumber, document) VALUES (?,?)

Otherwise you would use an update statement to do an update.

   update archive set document = ? where docnumber = ?

HTH
Dennis Cote
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] Updating a BLOB field

2008-06-19 Thread flakpit

I use a language called PureBasic and am playing with BLOB data. Got data
saving successfully but read in these forums that updating is the same. Yes,
I know it's a compiled statement, saving to database is fine, I can even
view my saved blobs so I know my code works..

The SQL to insert the blob into my database is :

"INSERT INTO archive (docnumber, document) VALUES (?,?)"

How to change the syntax to update a blob field? Is it the same as updating
normal data or a variant on the above?
-- 
View this message in context: 
http://www.nabble.com/Updating-a-BLOB-field-tp18008842p18008842.html
Sent from the SQLite mailing list archive at Nabble.com.

___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users