[sqlite] compile sqlite with Visual Studio 6

2010-07-07 Thread Andrea Galeazzi
How can I compile sqlite with Visual Studio 6 with an equivalent option of /fp:precise? ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] How to determine when to VACUUM?

2010-07-07 Thread Igor Sereda
> It's never time to VACUUM a database. This is an interesting statement. In our application, all tables get heavily fragmented with time (99% or more). I was considering VACUUM as a means to defragment, and, presumably, improve search performance. Was I misguided, and search performance does not

Re: [sqlite] How to determine when to VACUUM?

2010-07-07 Thread Igor Sereda
My two cents, to complement other answers: leave it to the user. In case of a client-side GUI app, let the user run some maintenance action, like an OS has "defragment disk" action, or Outlook has "compact folders" action. In case of a server-side app, make a script or admin command to do that.

[sqlite] FTS3 snippet problem: function returns full document content

2010-07-07 Thread Alexey Pechnikov
For some documents snippet function returns full document content: sqlite> select length(snippet(file_text)) from file_text where file_text match 'переоформление договора' and rowid=1015; 42312 sqlite> select substr(snippet(file_text),1,500) from file_text where file_text match 'переоформление

Re: [sqlite] How to determine when to VACUUM?

2010-07-07 Thread Simon Slavin
On 7 Jul 2010, at 10:03am, Igor Sereda wrote: >> It's never time to VACUUM a database. > > This is an interesting statement. In our application, all tables get > heavily fragmented with time (99% or more). I was considering VACUUM > as a means to defragment, and, presumably, improve search

Re: [sqlite] How to determine when to VACUUM?

2010-07-07 Thread Pavel Ivanov
> (I guess it well might not on an SSD disk, but on a conventional > rotational disk, pager could read several pages ahead with one seek - > but does it?) You mean that pager should read several pages at once even if it doesn't need them right now but it estimates that it will need them in near

Re: [sqlite] EXTERNAL:Re: EXTERNAL: setup sqlite in vc++

2010-07-07 Thread Black, Michael (IS)
You don't need the lib -- you just need to include sqlite3.c as another source file in your project. Michael D. Black Senior Scientist Northrop Grumman Mission Systems From: sqlite-users-boun...@sqlite.org on behalf of smengl90 Sent: Tue 7/6/2010 5:09 PM

Re: [sqlite] EXTERNAL: compile sqlite with Visual Studio 6

2010-07-07 Thread Black, Michael (IS)
Didn't we just answer this or similar? Download the amalgamation and include sqlite3.c in your project. You can put whatever switches you want on it. http://www.sqlite.org/download.html Michael D. Black Senior Scientist Northrop Grumman Mission Systems

Re: [sqlite] Getting declared datatype of a column in C

2010-07-07 Thread Andrew Wood
Is there not just a function which will take the index of a column and return its declared type? On 07/07/10 04:41, Jay A. Kreibich wrote: > On Tue, Jul 06, 2010 at 11:27:09PM +0100, Andrew Wood scratched on the wall: > >> Ive been looking at the function >> >> sqlite3_column_decltype >> >>

[sqlite] ANN: AnySQL Maestro 10.7 released

2010-07-07 Thread SQL Maestro Group
Hi! SQL Maestro Group announces the release of AnySQL Maestro 10.7, a powerful tool for managing any database engine accessible via ODBC driver or OLE DB provider (SQLite, MySQL, SQL Server, Oracle, Access, etc). The new version is immediately available at

[sqlite] sqlite3_step returns sqlite_busy

2010-07-07 Thread Lloyd
Hi, We have a multi-threaded application (I know "threads are evil", but this is a small server application). Each thread tries to access the SQLite database. When trying to get a DB handle (sqlite3_open), if it returns SQLITE_BUSY, then the thread will wait for some time and try to open it

Re: [sqlite] WAL journal size grow unlimited

2010-07-07 Thread Richard Hipp
FTS3 works by building small inverted indices and periodically merging the smaller indices into larger indices. The mergers are incremental. But once you get to the point of multi-gigabyte FTS3 tables and you are combining 100,000 inserts into a single transaction, you can end up with some very,

Re: [sqlite] EXTERNAL: sqlite3_step returns sqlite_busy

2010-07-07 Thread Black, Michael (IS)
Of course it's possible -- multiple clients accesing the database is just fine. Is there any reason you need exclusive access for each thread in ping-pong mode? If not, just handle the BUSY in both places. Michael D. Black Senior Scientist Northrop Grumman Mission Systems

Re: [sqlite] EXTERNAL: sqlite3_step returns sqlite_busy

2010-07-07 Thread Lloyd
- Original Message - From: "Black, Michael (IS)" To: "General Discussion of SQLite Database" Sent: Wednesday, July 07, 2010 5:35 PM Subject: Re: [sqlite] EXTERNAL: sqlite3_step returns sqlite_busy Of course it's possible -- multiple

Re: [sqlite] Getting declared datatype of a column in C

2010-07-07 Thread Jay A. Kreibich
On Wed, Jul 07, 2010 at 12:32:53PM +0100, Andrew Wood scratched on the wall: > Is there not just a function which will take the index of a column and > return its declared type? Not in the general case. sqlite3_column_decltype() will do it for SELECT statements, but only if the result-set

[sqlite] SqLite 3.7.0 amalgamation build warnings

2010-07-07 Thread Nick Shaw
Hi, I wanted to test the upcoming 3.7.0 build of sqlite to assist in the 'beta testing', however I'm getting the following build warnings which did not appear when compiling 3.6.x amalgamations. Please let me know if they are considered safe to ignore: (building in Visual Studio 2008 as

Re: [sqlite] sqlite3_step returns sqlite_busy

2010-07-07 Thread Pavel Ivanov
> one thread is preparing an "INSERT" statement (It returns SQLITE_OK), > then it is executed using sqlite3_step. sqlite3_step returns an > SQLITE_BUSY! Is there any possibility for this? Sure. Preparing INSERT statement doesn't acquire any "write" locks on the database. It's executing the INSERT

Re: [sqlite] EXTERNAL: sqlite3_step returns sqlite_busy

2010-07-07 Thread Pavel Ivanov
> You men to handle the BUSY by waiting for some time and trying to execute > sqlite3_step? You can call sqlite3_busy_timeout() with appropriate value after opening a connection and SQLite will do this waiting for you. Just remember that explicit transaction that began as read-only and then

Re: [sqlite] sqlite3_step returns sqlite_busy

2010-07-07 Thread Lloyd
So it means we can have mor than one valid db handle? Thanks, Lloyd - Original Message - From: "Pavel Ivanov" To: "General Discussion of SQLite Database" Sent: Wednesday, July 07, 2010 6:40 PM Subject: Re: [sqlite] sqlite3_step returns

Re: [sqlite] sqlite3_step returns sqlite_busy

2010-07-07 Thread Pavel Ivanov
> So it means we can have mor than one valid db handle? Yes. Pavel On Wed, Jul 7, 2010 at 9:29 AM, Lloyd wrote: > So it means we can have mor than one valid db handle? > > Thanks, >  Lloyd > > - Original Message - > From: "Pavel Ivanov" > To:

Re: [sqlite] Getting declared datatype of a column in C

2010-07-07 Thread Andrew Wood
Ok, what if I come at the problem from the opposite side: The problem is, Ive got a BLOB field which contains a char array as an escpaped string but when I call sqlite3_column_type(preparedstatement, x); it comes back as SQLITE_TEXT not SQLITE_BLOB I want a way to detect that it should really

Re: [sqlite] SqLite 3.7.0 amalgamation build warnings

2010-07-07 Thread Nick Shaw
Forgot to say: I've got these lines added at the top of the file (thus the line number references are 7 lines lower than the original source): //--- Added lines: #pragma warning (disable:4127) #pragma warning (disable:4244) #pragma warning (disable:4706) #define SQLITE_ENABLE_COLUMN_METADATA //

Re: [sqlite] Getting declared datatype of a column in C

2010-07-07 Thread Jay A. Kreibich
On Wed, Jul 07, 2010 at 02:35:58PM +0100, Andrew Wood scratched on the wall: > Ok, what if I come at the problem from the opposite side: > > The problem is, Ive got a BLOB field which contains a char array as an > escpaped string but when I call sqlite3_column_type(preparedstatement, > x); it

Re: [sqlite] Numbers as CHARs.

2010-07-07 Thread Ted Rolle, Jr.
On Tue, 6 Jul 2010 17:13:44 -0500 P Kishor wrote: > I have no idea why you would say that. It works just fine. > > sqlite> CREATE TABLE UPCs (UPC TEXT); > sqlite> INSERT INTO UPCs VALUES ('043000205563'); > sqlite> SELECT * FROM UPCs; > UPC > > 043000205563 >

Re: [sqlite] WAL journal size grow unlimited

2010-07-07 Thread Richard Hipp
2010/7/7 Alexey Pechnikov > And additional problem fired when increased range j<=2000: > ... > 558 > database disk image is malformed >while executing > "db eval {insert into role (uuid) values (hex(randomblob(16)))}" > ... > This problem should be fixed in the

Re: [sqlite] How to determine when to VACUUM?

2010-07-07 Thread Jay A. Kreibich
On Wed, Jul 07, 2010 at 01:03:26PM +0400, Igor Sereda scratched on the wall: > > It's never time to VACUUM a database. > > This is an interesting statement. In our application, all tables get > heavily fragmented with time (99% or more). I was considering VACUUM > as a means to defragment, and,

Re: [sqlite] SqLite 3.7.0 amalgamation build warnings

2010-07-07 Thread Nick Shaw
Realised I also fixed this warning before posting too: static const VdbeOp dummy; /* Ignore the MSVC warning about no initializer */ > warning C4132: 'dummy' : const object should be initialized Another not entirely worrysome issue, but thought I'd mention it. Here's another that was in

Re: [sqlite] SqLite 3.7.0 amalgamation build warnings

2010-07-07 Thread Eric Smith
Nick Shaw wrote: > Realised I also fixed this warning before posting too: You may not be getting a lot of responses on this because the SQLite devs have a philosophy that, for this project, chasing down compiler warnings is generally a waste of time. See

Re: [sqlite] SqLite 3.7.0 amalgamation build warnings

2010-07-07 Thread Nick Shaw
Ah, ok thanks. I'm not too concerned about the warnings myself; as I said, I can hide them. I just wanted to highlight them incase they've not been spotted in the compilers the developers use. The build warning is my main concern: > warning BK4504 : file contains too many references; ignoring

Re: [sqlite] SqLite 3.7.0 amalgamation build warnings

2010-07-07 Thread Eric Smith
Nick Shaw wrote: > If it's safe to ignore Note that I was careful not to say that the warnings are safe to ignore. :) I only said that the SQLite devs may ignore them without further evidence of problems. I'm not an expert on the SQLite code, so wouldn't make any specific claims about

Re: [sqlite] SqLite 3.7.0 amalgamation build warnings

2010-07-07 Thread Pavel Ivanov
> The build warning is my main concern: >> warning BK4504 : file contains too many references; ignoring further > references from this source Looks like this warning can be safely ignored and internet even has quite a few suggestions on its suppression. Here's what I found:

Re: [sqlite] EXTERNAL:Re: EXTERNAL: setup sqlite in vc++

2010-07-07 Thread smengl90
Ok, I did just that, but now I get errors when compiling, all related to the malloc operations. 1>Compiling... 1>TestSqlite.cpp 1>c:\documents and settings\las1pal\my documents\visual studio 2008\projects\sqlite3\sqlite3.c(12281) : error C2440: '=' : cannot convert from 'void *' to 'char *' 1>

Re: [sqlite] EXTERNAL:Re: EXTERNAL: setup sqlite in vc++

2010-07-07 Thread Black, Michael (IS)
I've got Visual Express 2008 C++ -- I made a Win32 console application and compiled this just fine. If you want to send your email address I'll email you the project and you can try it on the non-Express version. Michael D. Black Senior Scientist Northrop Grumman Mission Systems

Re: [sqlite] EXTERNAL:Re: EXTERNAL: setup sqlite in vc++

2010-07-07 Thread Simon Davies
On 7 July 2010 18:19, smengl90 wrote: > > Ok, I did just that, but now I get errors when compiling, all related to the > malloc operations. > > 1>Compiling... > 1>TestSqlite.cpp > 1>c:\documents and settings\las1pal\my documents\visual studio >

Re: [sqlite] How to determine when to VACUUM?

2010-07-07 Thread Simon Slavin
On 7 Jul 2010, at 4:14pm, Jay A. Kreibich wrote: >> (I guess it well might not on an SSD disk, but on a conventional >> rotational disk, pager could read several pages ahead with one seek - >> but does it?) > > No, the pager does not. Among other things, my feeling is that the > locality of

Re: [sqlite] EXTERNAL:Re: EXTERNAL: setup sqlite in vc++

2010-07-07 Thread smengl90
Here is my email address fixed-term.seak.meng...@us.bosch.com Thanks Black, Michael (IS) wrote: > > I've got Visual Express 2008 C++ -- I made a Win32 console application and > compiled this just fine. > > If you want to send your email address I'll email you the project and you > can try

[sqlite] Books which cover C API

2010-07-07 Thread Andrew Wood
Which of the books on the market is the best for covering the C API? ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Books which cover C API

2010-07-07 Thread Jay A. Kreibich
On Wed, Jul 07, 2010 at 07:45:02PM +0100, Andrew Wood scratched on the wall: > Which of the books on the market is the best for covering the C API? http://sqlite.org/books.html If you want to go out and buy something today, the most popular book is "The Definitive Guide to SQLite" by

Re: [sqlite] WAL journal size grow unlimited

2010-07-07 Thread Alexey Pechnikov
Thanks, the problem is fixed in trunk for my tests. 7 июля 2010 г. 19:03 пользователь Richard Hipp написал: > > This problem should be fixed in the latest snapshot available at > http://www.sqlite.org/draft/download.html (or from Alexey's fossil > mirror.) > > -- Best regards,

Re: [sqlite] Books which cover C API

2010-07-07 Thread Sam Carleton
On Wed, Jul 7, 2010 at 2:55 PM, Jay A. Kreibich wrote: > > This one is coming out next month. I like it. > > http://www.amazon.com/Using-SQLite-Jay-Kreibich/dp/0596521189/ > Jay, Without knowing anything more about the book other then the link you provided, the one thing I do

Re: [sqlite] WAL questions

2010-07-07 Thread Alexey Pechnikov
See http://sqlite.org/draft/wal.html : "An SQLite database _connection_ defaults to journal_mode=DELETE. To convert to WAL mode, use the following pragma: PRAGMA journal_mode=WAL;" -- Best regards, Alexey Pechnikov. http://pechnikov.tel/

[sqlite] Reg: In Memory Database Using SQLite

2010-07-07 Thread Subhadeep Ghosh
Hello People, I finally managed to create a wrapper around the SQLite core to support the creation of in-memory databases. The wrapper comprises of three functions - one to serialize the database, one to de-serialize a database and the third one to do the cleanup job. The function which

[sqlite] How to access and open an existing SQLite database (in Eclipse/Emulator)

2010-07-07 Thread Chris
Hello Everyone, I have created and loaded a small amount of data into a database via the SQLite3 command line tool. I am developing in Eclipse and using the emulator to test with. I do not have an Android phone. I would like to know what the accepted practice is for where to put the database in

Re: [sqlite] EXTERNAL:Re: EXTERNAL: setup sqlite in vc++

2010-07-07 Thread smengl90
still doesn't work. Do I need to download the precompiled binaries at all? or including the sqlite3.c and sqite3.h found in the amalgamation is enough? smengl90 wrote: > > Here is my email address fixed-term.seak.meng...@us.bosch.com > > Thanks > > > Black, Michael (IS) wrote: >> >> I've

Re: [sqlite] EXTERNAL:Re: EXTERNAL: setup sqlite in vc++

2010-07-07 Thread smengl90
Still doesn't work. Do I need the precompiled binaries at all? or including sqlite3.c and sqlite3.h found in the amalgamation is enough? SimonDavies wrote: > > On 7 July 2010 18:19, smengl90 > wrote: >> >> Ok, I did just that, but now I get errors when

Re: [sqlite] setup sqlite in vc++

2010-07-07 Thread Simon Slavin
On 7 Jul 2010, at 11:54pm, smengl90 wrote: > Still doesn't work. Do I need the precompiled binaries at all? or including > sqlite3.c and sqlite3.h found in the amalgamation is enough? SQLite is distributed as source code. The two files sqlite3.c and sqlite3.h are everything you need to use

Re: [sqlite] How to access and open an existing SQLite database (in Eclipse/Emulator)

2010-07-07 Thread Simon Slavin
On 7 Jul 2010, at 11:12pm, Chris wrote: > I would like to know what the accepted practice is for where to put > the database in my Eclipse Android project folder structure, and how > to access it in my java code. > > Is it possible to do this or do I have to open the db file as a > regular file

Re: [sqlite] Books which cover C API

2010-07-07 Thread Mohit Sindhwani
On 8/7/2010 2:55 AM, Jay A. Kreibich wrote: > On Wed, Jul 07, 2010 at 07:45:02PM +0100, Andrew Wood scratched on the wall: > >> Which of the books on the market is the best for covering the C API? >> >http://sqlite.org/books.html > > > > >If you want to go out and buy something

Re: [sqlite] setup sqlite in vc++

2010-07-07 Thread Sam Carleton
On Wed, Jul 7, 2010 at 7:12 PM, Simon Slavin wrote: > > The precompiled binaries are for those who see SQLite as some sort of > external library and don't want to include it in their own application. > It's a useful alternative for those who want to keep their own app as

Re: [sqlite] Books which cover C API

2010-07-07 Thread Tito Ciuro
On 8 Jul 2010, at 01:58, Mohit Sindhwani wrote: > On 8/7/2010 2:55 AM, Jay A. Kreibich wrote: >> On Wed, Jul 07, 2010 at 07:45:02PM +0100, Andrew Wood scratched on the wall: >> >>> Which of the books on the market is the best for covering the C API? >>> >>

Re: [sqlite] Books which cover C API

2010-07-07 Thread Mohit Sindhwani
On 8/7/2010 8:06 AM, Tito Ciuro wrote: > On 8 Jul 2010, at 01:58, Mohit Sindhwani wrote: > > >> On 8/7/2010 2:55 AM, Jay A. Kreibich wrote: >> >>> On Wed, Jul 07, 2010 at 07:45:02PM +0100, Andrew Wood scratched on the wall: >>> >>> Which of the books on the

Re: [sqlite] Books which cover C API

2010-07-07 Thread Tito Ciuro
On 08/07/2010, at 02:11, Mohit Sindhwani wrote: > On 8/7/2010 8:06 AM, Tito Ciuro wrote: >> On 8 Jul 2010, at 01:58, Mohit Sindhwani wrote: >> >> >>> On 8/7/2010 2:55 AM, Jay A. Kreibich wrote: >>> On Wed, Jul 07, 2010 at 07:45:02PM +0100, Andrew Wood scratched on the

Re: [sqlite] Books which cover C API

2010-07-07 Thread Mohit Sindhwani
On 8/7/2010 8:17 AM, Tito Ciuro wrote: > Yes. The book is quite good, I admit, but if you need to find specific > things... the answer might not be referenced where you think it'd be. Or not > mentioned at all. Is it really *that* difficult? I truly hope they pay > attention to this whenever in

Re: [sqlite] EXTERNAL:Re: EXTERNAL: setup sqlite in vc++

2010-07-07 Thread Subhadeep Ghosh
Hello Seak, Try doing the following, 1. In your project select and right click on the sqlite3.c file. 2. Then click on the 'Properties' on the drop down menu. 3. When the 'sqlite3.c Property Pages' dialog opens up, click on the 'C/C++' tree node. 4. Next click on the 'Advanced' item in the

Re: [sqlite] WAL questions

2010-07-07 Thread Max Vlasov
Alexey, I read this sentence, but it didn't help. So I suppose there's a bug in PRAGMA journal_mode logic Steps to reproduce. 1. Create an empty base with some table. Look at the 18,19 offsets, they both = 1, it's ok, the base is compatible with full range of sqlite3 versions. 2. Do PRAGMA

[sqlite] how can i unsubscribe from this forum?

2010-07-07 Thread Ravi Kiran
-- Best Regards, Ravi ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

[sqlite] "adb shell" command gives very inconsistent results

2010-07-07 Thread ca44
 I do not own an Android phone and am working exclusively in the Eclipse/emulator environment on my laptop. When I type in the "adb shell" cmd from the tools directory I get very inconsistent results. Sometimes it says "error: device not found". Sometimes it says "error: device offline".

Re: [sqlite] how can i unsubscribe from this forum?

2010-07-07 Thread John Drescher
Follow the link at the bottom of each message. On Thu, Jul 8, 2010 at 12:54 AM, Ravi Kiran wrote: > -- > Best Regards, > Ravi > ___ > sqlite-users mailing list > sqlite-users@sqlite.org >

Re: [sqlite] "adb shell" command gives very inconsistent results

2010-07-07 Thread Simon Slavin
On 8 Jul 2010, at 6:18am, c...@comcast.net wrote: > I do not own an Android phone and am working exclusively in the > Eclipse/emulator environment on my laptop. You're posting to the sqlite discussion list. You need to ask about this on a list about Eclipse or something. Simon.