[sqlite] [ANN] SQLiteManager 3.5

2010-07-20 Thread Marco Bambini
Viadana, Italy - SQLabs has announced SQLiteManager 3.5, the most powerful sqlite database manager tool for MacOS X and Windows. SQLiteManager is a powerful GUI database manager for sqlite databases. It combines an incredible easy to use interface with blazing speed and advanced features.

Re: [sqlite] "Unable to Open DB" on Win-7 & Vista (64 bitt) on UAC -ON

2010-07-20 Thread preeti.yadav1
In my case, the DB is created by the older version of application and now the new version of application is installed and End user has option to see old data with selecting old version of DB so its completely on end user wish to choose the location for DB. And also new tables in DB are created to

Re: [sqlite] C++ struct declarations

2010-07-20 Thread Pavel Ivanov
> Is there a working (with C++) sqlite3.h equivalent available > somewhere, or do I need to hack on it? A lot of people on this list including me use sqlite3.h in their C++ applications and don't see any problems compiling that as is. So you should look at how you use that header and/or how you

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

2010-07-20 Thread i
-- 追求自由,崇尚简单~ -- Original -- From: "Jay A. Kreibich"; Date: 2010年7月7日(星期三) 下午4:41 To: "General Discussion of SQLite Database"; Subject: Re: [sqlite] Getting declared datatype of a column in C

Re: [sqlite] bug report: data race in multi-threaded execution ofsqlite3

2010-07-20 Thread heechul Yun
Yes, retry on SQLITE_SCHEMA solve the problem. Should the FAQ be updated? BTW, I found that the huge number of data race warnings can easily be removed. The found races are benign--it just assign same static mutex id whenever pthreadMutexAlloc() is called. by not assigning the mutex id once it is

Re: [sqlite] bug report: data race in multi-threaded execution ofsqlite3

2010-07-20 Thread Pavel Ivanov
> BTW, I found that the huge number of data race warnings can easily be > removed. The found races are benign--it just assign same static mutex id > whenever pthreadMutexAlloc() is called. by not assigning the mutex id once > it is initialized -- as in MAKE_DRD_HAPPY --, most of race warnings are

[sqlite] Problem writing vector to blob

2010-07-20 Thread Robert McVicar
I have some code which uses the sqlite3_blob_write() function, but I observe some odd behaviour. When I pass it a QVector (Qt vector class - similar to std::vector, contiguous memory) of a class C (for example) when the vector is of significant size (over 200 entries), towards the end of the

Re: [sqlite] Problem writing vector to blob

2010-07-20 Thread Andy Gibbs
On Tuesday, July 20, 2010 12:37 PM, Robert McVicar wrote: >I have some code which uses the sqlite3_blob_write() function, but I > observe some odd behaviour. > When I pass it a QVector (Qt vector class - similar to std::vector, > contiguous memory) of a class C (for example) when the vector is

[sqlite] suggestion: bitwise shift right optimization

2010-07-20 Thread Max Vlasov
Hi, as long as I see currently bitwise right does not use index CREATE TABLE [TestTable] ([Id] INTEGER PRIMARY KEY AUTOINCREMENT); EXPLAIN QUERY PLAN SELECT * FROM TestTable WHERE Id >> 12 = 1000; : TABLE TestTable Sure I can replace it with the following query EXPLAIN QUERY PLAN SELECT * FROM

Re: [sqlite] suggestion: bitwise shift right optimization

2010-07-20 Thread Pavel Ivanov
> Are there reasons not to implement optimization in the first case? Except > for this is not most requested one :) I guess because this case is highly specific and it's behavior should depend on particular constants used. Put there for example Id >> 54 = 1000 and now we should make optimizer

Re: [sqlite] error in sum function

2010-07-20 Thread Max Vlasov
SQLite Expert (which I use extensively in the Pro version) enforces > displaying types as declared. So if you declare your column as INTEGER > (or INT, ...) then it will display integers regardless of the actual > individual data type using common conversions. This is a side effect > of the

Re: [sqlite] suggestion: bitwise shift right optimization

2010-07-20 Thread Max Vlasov
On Tue, Jul 20, 2010 at 5:14 PM, Pavel Ivanov wrote: > > Are there reasons not to implement optimization in the first case? Except > > for this is not most requested one :) > > I guess because this case is highly specific and it's behavior should > depend on particular

[sqlite] ON conditions vs. WHERE conditions

2010-07-20 Thread Jean-Christophe Deschamps
What is the rationale about placing complex conditions in the ON part of an inner join rather than in an WHERE clause? I understand that the ON clause will limit the temporary table processed by a subsequent WHERE clause, while a larger table will be filtered by the WHERE part if no selective

Re: [sqlite] ON conditions vs. WHERE conditions

2010-07-20 Thread Igor Tandetnik
Jean-Christophe Deschamps wrote: > What is the rationale about placing complex conditions in the ON part > of an inner join rather than in an WHERE clause? Except for outer joins, the difference is purely stylistic. They are functionally equivalent. In fact, SQLite internally

Re: [sqlite] ON conditions vs. WHERE conditions

2010-07-20 Thread P Kishor
On Tue, Jul 20, 2010 at 9:43 AM, Jean-Christophe Deschamps wrote: > What is the rationale about placing complex conditions in the ON part > of an inner join rather than in an WHERE clause? My sense is that it is not so much about "complexity" but more about the logic of the

[sqlite] Horrendous slowdown when updating versions

2010-07-20 Thread Ed Hawke
Hi all, I was running a system using an old sqlite3.dll (version 3.0.8, I believe). Updating to the latest version (3.6.23) causes my program to run incredibly slowly. As an example, selecting approximately 30,000 records was taking 10 seconds with the old dll, and with the updated version

Re: [sqlite] ON conditions vs. WHERE conditions

2010-07-20 Thread Jean-Christophe Deschamps
> > What is the rationale about placing complex conditions in the ON part > > of an inner join rather than in an WHERE clause? > >Except for outer joins, the difference is purely stylistic. They are >functionally equivalent. In fact, SQLite internally rewrites the >former to the latter, before

[sqlite] how to get the number of rows in a a table?

2010-07-20 Thread dmsmsm
how to get the number of rows in a a table? what is the function to get that? Please add a sample code to achive that. thanks dmsmsm -- View this message in context: http://old.nabble.com/how-to-get-the-number-of-rows-in-a-a-table--tp29216126p29216126.html Sent from the SQLite mailing list

Re: [sqlite] how to get the number of rows in a a table?

2010-07-20 Thread P Kishor
On Tue, Jul 20, 2010 at 11:41 AM, dmsmsm wrote: > > how to get the number of rows in a a table? what is the function to get that? > Please add a sample code to achive that. SELECT Count(*) FROM table; ___ sqlite-users mailing

Re: [sqlite] how to get the number of rows in a a table?

2010-07-20 Thread Timothy A. Sawyer
Select count(*) from table --Original Message-- From: dmsmsm Sender: sqlite-users-boun...@sqlite.org To: sqlite-users@sqlite.org ReplyTo: General Discussion of SQLite Database Subject: [sqlite] how to get the number of rows in a a table? Sent: Jul 20, 2010 09:41 how to get the number

Re: [sqlite] Horrendous slowdown when updating versions

2010-07-20 Thread Max Vlasov
On Tue, Jul 20, 2010 at 7:38 PM, Ed Hawke < edward.ha...@hawkeyeinnovations.co.uk> wrote: > I was running a system using an old sqlite3.dll (version 3.0.8, I believe). > > Updating to the latest version (3.6.23) causes my program to run > incredibly slowly. > > Can you provide more details about

Re: [sqlite] suggestion: bitwise shift right optimization

2010-07-20 Thread Jay A. Kreibich
On Tue, Jul 20, 2010 at 04:43:26PM +0400, Max Vlasov scratched on the wall: > Hi, > as long as I see currently bitwise right does not use index Doing this requires recognizing when an inverse expression exists, and then computing it. It is extremely difficult in the general case. If you

Re: [sqlite] suggestion: bitwise shift right optimization

2010-07-20 Thread Max Vlasov
> In the case of SQLite, it is also very unlikely to save space. In > fact, because of the way integer values are stored, it is very > likely to use more space. > Jay, In most cases yes, but there are ones with several integers that should be used together in ordering, the space is wasted

[sqlite] how to retrieve the result of an sqlite_exec()

2010-07-20 Thread dmsmsm
Hi, Iam new to sqlite3. I want to get the number of rows in a table. I am using sqlite_exec(), but not sure, this is the correct function to get the number of rows. Please help me my code is NSString *rowcount = [NSString stringWithFormat:@"SELECT COUNT(*) FROM DB;"]; char *err; if

Re: [sqlite] "Unable to Open DB" on Win-7 & Vista (64 bitt) on UAC -ON

2010-07-20 Thread Pavel Ivanov
If your end user controls where to put the database file then after receiving error "Unable to open database" you should tell him to change permissions on that file to be accessible to everybody. Don't forget to tell him to change permissions on the directory where database resides too. Pavel

[sqlite] 3rd Call For Papers, 17th Annual Tcl/Tk Conference 2010

2010-07-20 Thread Andreas Kupries
[[ Get your papers in. The deadline for abstracts and proposals is less than two weeks away. ]] 17th Annual Tcl/Tk Conference (Tcl'2010) http://www.tcl.tk/community/tcl2010/ October 11 - 15, 2010 Hilton Suites/Conference Center Chicago/Oakbrook Terrace, Illinois, USA Important

[sqlite] SQLite database corruption

2010-07-20 Thread Grzegorz Russek
Hi, We're experiencing strange database corruptions using SQLite database (we are using it for over three years). We are reporting this now because one of databases got corrupted on less sensitive data which we can give you for analysis and because we wanted to reject all other possibilities of

Re: [sqlite] how to retrieve the result of an sqlite_exec()

2010-07-20 Thread Simon Slavin
On 20 Jul 2010, at 7:42pm, dmsmsm wrote: > Iam new to sqlite3. I want to get the number of rows in a table. I am using > sqlite_exec(), but not sure, this is the correct function to get the number > of rows. > Please help me > my code is > > NSString *rowcount = [NSString

Re: [sqlite] how to retrieve the result of an sqlite_exec()

2010-07-20 Thread Jay A. Kreibich
On Tue, Jul 20, 2010 at 10:41:04PM +0100, Simon Slavin scratched on the wall: > > On 20 Jul 2010, at 7:42pm, dmsmsm wrote: > > if (sqlite3_exec(db, [rowcount UTF8String], NULL, NULL, ) != SQLITE_OK) > Second, I see no reason why your code wouldn't work. Did you try it ? > What happened ?

Re: [sqlite] Cost of PRAGMA database_list

2010-07-20 Thread Sam Carleton
On Mon, Jul 19, 2010 at 9:46 PM, Simon Slavin wrote: > > On 20 Jul 2010, at 2:01am, Sam Carleton wrote: > > > On Mon, Jul 19, 2010 at 3:51 PM, Simon Slavin > wrote: > > > >> You know, I think that the most efficient way to do what you want will > >>

Re: [sqlite] Cost of PRAGMA database_list

2010-07-20 Thread Simon Slavin
On 21 Jul 2010, at 12:42am, Sam Carleton wrote: > There are two equally > important requires, one is to connect to the second "EventDB", the other is > that the system admin can change the EventDB at any time. You mean change the contents of that file, or change which file is nominated as the

Re: [sqlite] "Unable to Open DB" on Win-7 & Vista (64 bitt) on UAC -ON

2010-07-20 Thread preeti.yadav1
In my case, the DB is created by the older version of application and now the new version of application is installed and End user has option to see old data with selecting old version of DB so its completely on end user wish to choose the location for DB. And also new tables in DB are created