[sqlite] built-in functrion suggestion: size of blob

2005-10-23 Thread Lloyd Dupont
I look into the build in function of SQLite and saw there is a function to know the length of a string (in a record). Great! But to my disbelief there is (apparently) no way to get the size of a blob (other than loading it :-() And no, length() doesn't work on Blob. I think it would be a

[sqlite] Multithreading ( C#) question

2005-10-21 Thread Lloyd Dupont
I have read that SQLite doesn't suport well multithreading... I have the following problem and wonder if anyone could provide me some guidance. I have a GUI application using SQLite to store its data. I have a 'Search' panel. Performing a search (scan of the database) in the background. And

[sqlite] about text search

2005-06-25 Thread Lloyd Dupont
let's say I have a table like that CREATE TABLE Infos { id INTEGER, text TEXT } and I want to search a with the word... 'apple', 'cinamon', 'cake' I could write SELECT FROM infos WHERE text LIKE '*apple*' AND text LIKE '*cinamon*' AND text LIKE '*cake*' Now, isn't there a way to

Re: [sqlite] about text search

2005-06-25 Thread Lloyd Dupont
thanks all! - Original Message - From: Puneet Kishor [EMAIL PROTECTED] To: sqlite-users@sqlite.org Sent: Sunday, June 26, 2005 9:21 AM Subject: Re: [sqlite] about text search On Jun 25, 2005, at 6:05 PM, Lloyd Dupont wrote: let's say I have a table like that CREATE TABLE Infos

[sqlite] question about BLOB

2005-06-23 Thread Lloyd Dupont
in the application I'm writting I would make intensive use of BLOB in fact I have a very simple DB tables. However most of them have a BLOB column where I would put application defined data. The data could easily be over 50K (in fact it would be an in memory .tgz archive with user text and

[sqlite] SQL question

2005-06-08 Thread Lloyd Dupont
I have 2 related table: CREATE TABLE Ingredients( ID INTEGER PRIMARY KEY, name TEXT, description BLOB, property_ID INTEGER ); CREATE TABLE Properties( ID INTEGER PRIMARY KEY, price double ); When I create a new Ingredient I would like to create a new property for this

Re: [sqlite] SQL question

2005-06-08 Thread Lloyd Dupont
BTW, one more question / precision. in INSERT INTO Properties() I didn't pass the value for ID. because basically I want an auto-incremented value which I don't have to worry about. maybe that's not the way to use such value ?! - Original Message - From: Lloyd Dupont [EMAIL

Re: [sqlite] SQL question

2005-06-08 Thread Lloyd Dupont
thanks Martin it worked! although I replaced your (SELECT MAX(ID) FROM Properties) by ROWID. is it sound? like that: CREATE TRIGGER create_ingredient_property AFTER INSERT ON Ingredients BEGIN INSERT INTO Properties (price) VALUES (NULL); UPDATE Ingredients SET property_ID = ROWID

Re: [sqlite] SQL question

2005-06-08 Thread Lloyd Dupont
Thanks for that! last_insert_rowid() function: anyway, I hadn't tested the code. I mean the CREATE TRIGGER succeed. But I didn't check if the trigger itself works well. Now I did and have a problem... It don't work! I get: SQLite Error 1 - no such column: OLD.ID this is my setting: CREATE

Re: [sqlite] SQL question

2005-06-08 Thread Lloyd Dupont
Sorry, stupit mistak, I have to use NEW and not OLD in case of an INSERT trigger! Thanks all it works like a breeze! - Original Message - From: Lloyd Dupont [EMAIL PROTECTED] To: sqlite-users@sqlite.org Sent: Thursday, June 09, 2005 12:26 AM Subject: Re: [sqlite] SQL question Thanks

[sqlite] beginner's question

2005-06-05 Thread Lloyd Dupont
a question about sqlite3.exe reading some documentation aboit it I see you could have memory database. how do I create them? or attach them?