Re: [sqlite] Insert mode shows wrong type

2009-04-03 Thread Jay A. Kreibich
On Sat, Apr 04, 2009 at 02:22:33PM +1100, BareFeet scratched on the wall: > Hi all, > > If I have a text column, insert text into it, the ask SQLite for the > insert statement, shouldn't it show a text result? SQLite appears to > coerce it to a number if it can, but shouldn't. Asking

Re: [sqlite] Calculating the size of a backup

2009-04-03 Thread Brown, Daniel
After a bit of digging I think (PRAGMA) page_count * (PRAGMA) page_size is roughly the size of the database but is the actual database file that size. Is there a header to take into account too? > -Original Message- > From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users- >

[sqlite] C++ Samples

2009-04-03 Thread centipede moto
I am new to c++ (I know php, c# etc), and thanks to this list I've gotten sqlite3 to open a db connection without failing to find its libraries. But now that I have an open db connection I am lost, I can work my way through the c++ itself but I'm having a hard time finding c++ sqlite3 samples,

[sqlite] Calculating the size of a backup

2009-04-03 Thread Brown, Daniel
Good Morning List, Is there any way to calculate the size of a database backup before doing a backup? I need to know how big the backup database is going to before I call the new backup API: as the backup database is using an in memory VFS. Cheers, Daniel Brown | Software Engineer "The best

Re: [sqlite] Problems with file locks on USB keys

2009-04-03 Thread Sherief N. Farouk
> Hi - it only happens on Windows systems that are using U3 USB keys. > None of > the queries are intensive - they are pretty simple and shouldn't take > longer > than a few milliseconds. > > On harddisks it *always* works. Never had an issue there. > Like Teg said, you can use procmon in

Re: [sqlite] Problems with file locks on USB keys

2009-04-03 Thread Teg
Hello Dave, Friday, April 3, 2009, 12:16:37 PM, you wrote: DB> Hi - it only happens on Windows systems that are using U3 USB keys. None of DB> the queries are intensive - they are pretty simple and shouldn't take longer DB> than a few milliseconds. DB> On harddisks it *always* works. Never had

Re: [sqlite] Problems with file locks on USB keys

2009-04-03 Thread Dave Brown
Hi - it only happens on Windows systems that are using U3 USB keys. None of the queries are intensive - they are pretty simple and shouldn't take longer than a few milliseconds. On harddisks it *always* works. Never had an issue there. On Fri, Apr 3, 2009 at 5:15 AM, Emil Obermayr

Re: [sqlite] select with a like containing a line feed

2009-04-03 Thread Sylvain Pointeau
it is really perfect,thank you so much On Fri, Apr 3, 2009 at 2:55 PM, Simon Davies < simon.james.dav...@googlemail.com> wrote: > 2009/4/3 Sylvain Pointeau : > > re-hi, > > but how do we do if we are on unix and there is some CR on those field? > > I cannot insert CR

[sqlite] sqlite3_step() returning SQLITE_OK

2009-04-03 Thread Radcon Entec
According to the documentation, assuming I'm reading it correctly, and assuming there are no locks on the database, and assuming the query sent to sqlite3_prepare_v2() was valid, sqlite3_step() should return either SQLITE_ROW or SQLITE_DONE.  I am seeing a different result after executing a

Re: [sqlite] select with a like containing a line feed

2009-04-03 Thread Simon Davies
2009/4/3 Sylvain Pointeau : > re-hi, > but how do we do if we are on unix and there is some CR on those field? > I cannot insert CR in my statement (only line feed) > > do you have any suggestion? > > Cheers, > Sylvain > Something like this: SQLite version 3.4.2 Enter

Re: [sqlite] select with a like containing a line feed

2009-04-03 Thread Sylvain Pointeau
re-hi, but how do we do if we are on unix and there is some CR on those field? I cannot insert CR in my statement (only line feed) do you have any suggestion? Cheers, Sylvain On Fri, Apr 3, 2009 at 2:15 PM, Sylvain Pointeau wrote: > Hi, > thank you very much for

Re: [sqlite] Problems with file locks on USB keys

2009-04-03 Thread Emil Obermayr
On Thu, Apr 02, 2009 at 08:20:38PM -0700, Dave Brown wrote: > Our software often runs into problems when run on USB keys. Specifically, > calls to sqlite to read/write to the database hang infinitely, or return Does it work on harddisk? I can tell RO-access works nicely on Windows XP. Do you

Re: [sqlite] Problems with file locks on USB keys

2009-04-03 Thread Jean-Denis Muys
On 4/3/09 5:20 AM, "Dave Brown" wrote: > Our software often runs into problems when run on USB keys. Specifically, > calls to sqlite to read/write to the database hang infinitely, or return > SQLITE_BUSY after even 10 seconds of waiting. The problem seems to be that > the

[sqlite] Problems with file locks on USB keys

2009-04-03 Thread Dave Brown
Our software often runs into problems when run on USB keys. Specifically, calls to sqlite to read/write to the database hang infinitely, or return SQLITE_BUSY after even 10 seconds of waiting. The problem seems to be that the database file gets locked and remains locked, presumably by some problem

Re: [sqlite] select with a like containing a line feed

2009-04-03 Thread Emil Obermayr
On Fri, Apr 03, 2009 at 12:25:18PM +0200, Sylvain Pointeau wrote: > > How do I specify the character "line feed" (\n) > in my query? Depends a little on your wrapper (outer) programming language. A technic that works in most language is to fill a variable with the code of LF and then use this

Re: [sqlite] select with a like containing a line feed

2009-04-03 Thread Igor Tandetnik
"Sylvain Pointeau" wrote in message news:af5c8a920904030325w631f8dfcu90f5f80266f57...@mail.gmail.com > I have some line feed in one field in my table > and I would like to replace this line feed by a space. > > How do I specify the character "line feed" (\n) > in my