Re: [sqlite] Hard time with blobs

2008-07-24 Thread Sherief N. Farouk
I'm having a problem with the last parameter, the function used to dispose of the blob. Does sqlite defer actually inserting the blob into the database somehow? In other words, will I get into trouble if I do: Sqlite3_bind_blob(Statement, 1, BlobData, BlobSize, do_nothing); Delete [] BlobData; ?

Re: [sqlite] Hard time with blobs

2008-07-24 Thread Dan
On Jul 25, 2008, at 10:35 AM, Sherief N. Farouk wrote: > I want to use blobs to store binary objects in the database, but > I'm having > a hard time understanding how they work. First of all, I don't see > a way to > set a blob's size, and sqlite3_blob_write doesn't increase the size > of

Re: [sqlite] error:unable to open database file

2008-07-24 Thread kriscbe
hi all, solved it.previously for every 1 second in my code DB file 26 times opened and 26 times colses. so after particular no of time the DB file unable to reopen that file. for that i used a singleton pattern thats why DB file open only once in my entire code. because of that it works fine.

[sqlite] Hard time with blobs

2008-07-24 Thread Sherief N. Farouk
I want to use blobs to store binary objects in the database, but I'm having a hard time understanding how they work. First of all, I don't see a way to set a blob's size, and sqlite3_blob_write doesn't increase the size of the blob, which is putting me in a weird catch-22 situation. What's the

Re: [sqlite] Loading from Read Only storage and saving changes to aseparate storage unit

2008-07-24 Thread Griggs, Donald
Hi, Daniel, Regarding: "Another morning another question, what sort of facilities does SQLite provide for Loading from a read only storage location and then saving changes to a separate read/write storage unit? I know I can open a database file with a read only flag but how would I go about

Re: [sqlite] Does sqlite support stored procedure?

2008-07-24 Thread BareFeet
Hi John, > I would like to know if SQLite supports stored procedures. Technically, no it doesn't. For what purpose do you want to store procedures? You can store some procedures in triggers, if you want to have SQLite trigger a task when some data is changed. You can simply create a

Re: [sqlite] Does sqlite support stored procedure?

2008-07-24 Thread Griggs, Donald
Hi, John, Regarding: "I would like to know if SQLite supports stored procedures. This should be a simple question, but I did not find a clear answer on the SQLite website." In a word -- no, it does not. HOWEVER, it DOES: -- support a TRIGGER feature, with limitations. -- allow the creation

Re: [sqlite] Ignoring "The"

2008-07-24 Thread Stephen Oberholtzer
On Wed, Jul 23, 2008 at 9:11 AM, Andrew Gatt <[EMAIL PROTECTED]> wrote: > I have a table of music artist names which i'd like to output in order. > Normally i just use: > > select * from artists order by artist_name; > > What i'd really like to do is order the artists by name but ignore any >

Re: [sqlite] Corrupted database repairing

2008-07-24 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Alexey Pechnikov wrote: > Is any way to repair corrupted database? - From a theoretical point of view the only way to repair a corrupted database is if there are multiple redundant copies of data or of generating that data. Since SQLite doesn't do

[sqlite] Does sqlite support stored procedure?

2008-07-24 Thread John Zhang
I would like to know if SQLite supports stored procedures. This should be a simple question, but I did not find a clear answer on the SQLite website. Thanks, John ___ sqlite-users mailing list sqlite-users@sqlite.org

Re: [sqlite] Corrupted database repairing

2008-07-24 Thread Alexey Pechnikov
В сообщении от Thursday 24 July 2008 20:48:08 Alexey Pechnikov написал(а): > Hello! > > Is any way to repair corrupted database? May be I have archive copy of > database and corrupted this pages - can I get correct pages and merge their > with archive database? > > P.S. I have no corrupted

[sqlite] Loading from Read Only storage and saving changes to a separate storage unit

2008-07-24 Thread Brown, Daniel
Morning List, Another morning another question, what sort of facilities does SQLite provide for Loading from a read only storage location and then saving changes to a separate read/write storage unit? I know I can open a database file with a read only flag but how would I go about managing the

[sqlite] Corrupted database repairing

2008-07-24 Thread Alexey Pechnikov
Hello! Is any way to repair corrupted database? May be I have archive copy of database and corrupted this pages - can I get correct pages and merge their with archive database? P.S. I have no corrupted database now but this question is important for me. Best regards, Alexey.

[sqlite] Trigger (on delete)

2008-07-24 Thread Juzbrig
I want to make simple trigger. I have table 'genre' and 'artist', 'artist' have foreign key 'genre_id' which is the primary key in 'genre' table I want the trigger to delete artist wchich have the same foreign key as the deleted genre for example: "delete from artist where genre_id = '10'" is

Re: [sqlite] Trigger (on delete)

2008-07-24 Thread Igor Tandetnik
Juzbrig <[EMAIL PROTECTED]> wrote: > I want to make simple trigger. > I have table 'genre' and 'artist', 'artist' have foreign key > 'genre_id' which is the primary key in 'genre' table > I want the trigger to delete artist wchich have the same foreign key > as the deleted genre for example: >

Re: [sqlite] Overall question about transactions

2008-07-24 Thread Igor Tandetnik
Enrique Ramirez <[EMAIL PROTECTED]> wrote: > I've been working on DBMS systems for a couple of years now (namely > MS-SQL and MySQL) and I find SQLite's usage of transactions to be > quite unique and interesting. I've been reading on different websites > about them and one particular site (which

Re: [sqlite] problem building reduced-size sqlite

2008-07-24 Thread Shane Harrelson
Dennis- I'm not able to duplicate this here, and it apparently worked for the OP. What OS and shell are you running configure in? Can you check for stray /r/n line endings in the configure script. That can sometimes confuse the shell, and I may have left a one in. I can't comment on the

[sqlite] Overall question about transactions

2008-07-24 Thread Enrique Ramirez
Hello to all, I've been working on DBMS systems for a couple of years now (namely MS-SQL and MySQL) and I find SQLite's usage of transactions to be quite unique and interesting. I've been reading on different websites about them and one particular site (which sadly I can't remember) confused me a

Re: [sqlite] FTS index size

2008-07-24 Thread Jiri Hajek
> So, indeed, there's room for improvement! Thanks for looking into it, I'm interested in your results. That said, I still believe that the best way would be to make the current FTS implementation independent of the VIRTUAL TABLE structure, but be able to accept more general structures, namely

Re: [sqlite] SQLite under c++

2008-07-24 Thread Igor Tandetnik
"Juzbrig" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Ok it works but how do I get messages/errors back from DB? Because > now im doing it blind. You check return value for error code. If you got one, you call sqlite3_errmsg[16] for an error message. Igor Tandetnik

Re: [sqlite] Ignoring "The"

2008-07-24 Thread Chris Wedgwood
On Wed, Jul 23, 2008 at 02:11:27PM +0100, Andrew Gatt wrote: > I have a table of music artist names which i'd like to output in > order. Normally i just use: > > select * from artists order by artist_name; > > What i'd really like to do is order the artists by name but ignore > any "the" or

Re: [sqlite] .separator \t not working

2008-07-24 Thread none given
It still is not working... Terminal does not add a tab character with ctrl-v. I even tried pasting one... but in both cases the error bell rings! Merci pour l'aide ;-) S. --- On Thu, 7/24/08, Schplurtz le déboulonné <[EMAIL PROTECTED]> wrote: > From: Schplurtz le déboulonné <[EMAIL

Re: [sqlite] error:unable to open database file

2008-07-24 Thread kriscbe
i tried with 3 options in that pragma temp_store(0,1,2). but same problem occured. now that time increased for every 40 secs. thanks kris cbe Dennis Cote wrote: > > kriscbe wrote: >> >> i am getting new problem while executing my sqlite3 using c++ after some >> no >> of operations on db

Re: [sqlite] SQLite under c++

2008-07-24 Thread Juzbrig
Ok it works but how do I get messages/errors back from DB? Because now im doing it blind. Mike Marshall wrote: > > Do something like this > > sqlite3_stmt* pStatement; > vector vResults; > int nError = sqlite3_prepare_v2(pHandle,"SELECT col1 FROM > table",-1,,NULL); > while