[sqlite] ANN - DBD::SQLite version 1.24_01 - amalgamation

2009-04-22 Thread Darren Duncan
All, I am pleased to announce that DBD::SQLite (Self Contained RDBMS in a DBI Driver) version 1.24_01 has been released on CPAN (by Adam Kennedy). http://search.cpan.org/~adamk/DBD-SQLite-1.24_01/ The main feature of this release is that now DBD::SQLite also uses amalgamated source

[sqlite] Find in SQLite database

2009-04-22 Thread anna_shahinyan
Hello, please help me to find a solution to check if the record is already in database or not. I have tried the following but does not help: sqlite3_stmt *stmt; const char *sql_check = "SELECT * FROM MY_DATABASE WHERE id=?"; NSString *name = nil;

[sqlite] insert into multiple table

2009-04-22 Thread dipendra
hi i want to insert data in multiple table where one table depened upon the other table something like that--- 1-insert into phone table insert into phone(id,phone) values (auto incremented ,0); 2-take the phone id value in integer variable integer phoneid=value; 3-pass this value in

Re: [sqlite] insert into multiple table

2009-04-22 Thread Eugene Wee
Hi, On Wed, Apr 22, 2009 at 3:53 PM, dipendra wrote: > i want to insert data in multiple table where one table depened upon the > other table > something like that--- > > 1-insert into phone table > insert into phone(id,phone) values (auto incremented

Re: [sqlite] insert into multiple table

2009-04-22 Thread dipendra
hi thanks for the reply. yes, you are right. i am looking to last inserted id. i am new in sqlite. please exaplain briefly. can u give me a example ya code. thanks dipendra Eugene Wee-2 wrote: > > Hi, > > On Wed, Apr 22, 2009 at 3:53 PM, dipendra >

Re: [sqlite] Find in SQLite database

2009-04-22 Thread Igor Tandetnik
"anna_shahinyan" wrote in message news:23171280.p...@talk.nabble.com > I have tried the following but does not help: > >sqlite3_stmt *stmt; >const char *sql_check = "SELECT * FROM MY_DATABASE WHERE id=?"; >NSString *name = nil; >

[sqlite] TEMP_STORE not working ?(3.5.9)

2009-04-22 Thread Kris Groves
Hi, >From what I understand : - default behavior is to use files for temporary stuff. - the directory that will be used for these temporary files can be defined via pragma (temp_store_directory). If the pragma is not used, it will default to the first hardcoded directory (linux), in the order

Re: [sqlite] TEMP_STORE not working ?(3.5.9)

2009-04-22 Thread Kris Groves
Additionally, I have just tried changing the TEMP_STORE define in the code to 3, (just in case the compiler options were not working to begin with), with the same results as already described. Kris Groves wrote: > Hi, > From what I understand : > - default behavior is to use files for temporary

Re: [sqlite] Find in SQLite database

2009-04-22 Thread anna_shahinyan
Thanks, I have created NSString and added the id value, then for creating statement I have converted NSString to const char* by UTF8String but the it seems it does no t work as sqlite3_prepare_v2 does not return SQLITE_OK. Thanks for response. Igor Tandetnik wrote: > > "anna_shahinyan" >

Re: [sqlite] Find in SQLite database

2009-04-22 Thread Igor Tandetnik
"anna_shahinyan" wrote in message news:23175323.p...@talk.nabble.com > I have created NSString and added the id value, then for creating > statement I have converted NSString to const char* by UTF8String > but the it seems it does no t work as sqlite3_prepare_v2 does not

Re: [sqlite] Find in SQLite database

2009-04-22 Thread John Machin
On 22/04/2009 10:29 PM, anna_shahinyan wrote: > Thanks, > > I have created NSString and added the id value, then for creating > statement I have converted NSString to const char* by UTF8String > but the it seems it does no t work as sqlite3_prepare_v2 does not return > SQLITE_OK. Anna, show us

[sqlite] Run-Time Check Failure

2009-04-22 Thread sqlite
Hello all, I'm compiling sqlite 3.6.13 with Visual 2003, and RunTime Check activated, and it gives this error : Run-Time Check Failure #1 - A cast to a smaller data type has caused a loss of data. If this was intentional, you should mask the source of the cast with the appropriate bitmask.

Re: [sqlite] Run-Time Check Failure

2009-04-22 Thread D. Richard Hipp
On Apr 22, 2009, at 11:23 AM, sql...@fauvelle.net wrote: > Hello all, > > I'm compiling sqlite 3.6.13 with Visual 2003, and RunTime Check > activated, and it gives this error : > > Run-Time Check Failure #1 - > A cast to a smaller data type has caused a loss of data. If this was > intentional,

[sqlite] Columns in where clause and the index.

2009-04-22 Thread Joanne Pham
Hi All, I was wondering if we need to have the order of columns in the where clause need to be matched with the order of the indexes. Does the index will be used if the columns in the where clause didn't match with the columns in the defined index? Thanks, JP

Re: [sqlite] Columns in where clause and the index.

2009-04-22 Thread Steve Friedman
See (possibly among others) http://www.sqlite.org/cvstrac/tktview?tn=3678 Steve Friedman Joanne Pham wrote: > Hi All, > I was wondering if we need to have the order of columns in the where clause > need to be matched with the order of the indexes. > Does the index will be used if the columns in

Re: [sqlite] Run-Time Check Failure

2009-04-22 Thread sqlite
> This is probably not a bug. There are places in the SQLite code where > we deliberately discard all but the lower 8 bits of an integer. But, > if you like to tell us *where* in the code this occurs, I'll be happy > to verify it for you. In sqlite3.c big file, it's in static u8

Re: [sqlite] Run-Time Check Failure

2009-04-22 Thread D. Richard Hipp
On Apr 22, 2009, at 11:49 AM, sql...@fauvelle.net wrote: > >> This is probably not a bug. There are places in the SQLite code >> where >> we deliberately discard all but the lower 8 bits of an integer. But, >> if you like to tell us *where* in the code this occurs, I'll be happy >> to verify

Re: [sqlite] Columns in where clause and the index.

2009-04-22 Thread D. Richard Hipp
No, the order of terms in a WHERE clause does *not* effect index usage. On Apr 22, 2009, at 11:36 AM, Steve Friedman wrote: > See (possibly among others) http://www.sqlite.org/cvstrac/tktview?tn=3678 > > Steve Friedman > > Joanne Pham wrote: >> Hi All, >> I was wondering if we need to have the

[sqlite] create the trigger to delete the data from other database

2009-04-22 Thread Joanne Pham
Hi All, Can we have the trigger to delete to data from different database? My application has 2 databases and when ever the application is deleting the rows in one of tables in DB1 I would like to have a trigger to delete the rows in table in DB2. Is this possible? Thanks, JP

Re: [sqlite] Run-Time Check Failure

2009-04-22 Thread Mark Spiegel
The compiler is not broken. If this behavior in the compiler bugs you, (pun intended) you can disable the warning locally or globally. This change is not obfuscating the code. It is not a work-around. It is making your intentions clear. When I read the line as written, I have to research

Re: [sqlite] create the trigger to delete the data from other database

2009-04-22 Thread Igor Tandetnik
Joanne Pham wrote: > Can we have the trigger to delete to data from different database? No. Igor Tandetnik ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

[sqlite] database is slowing down, caused by Sophos

2009-04-22 Thread Stef Mientki
hello, No question, just some information that might be useful to someone. We have a number of small SQLite databases, which are located on a network drive. Users are complaining the last months that these databases becomes slower every week. After investigating the case, we found that Sophos

Re: [sqlite] Run-Time Check Failure

2009-04-22 Thread sqlite
D. Richard Hipp a écrit : > This is not error in the SQLite code. The code here is correct. The > bug is in your compiler. Sorry but I don't agree at all. > Adding a work-around so that this will work in your compiler makes the > code rather more complicated: > > wsdPrng.j =

[sqlite] Fixing a database

2009-04-22 Thread Alberto Simões
Hello. I am not sure what happened, but I have a database that opens correctly with sqlite3 shell, I can select and query it, but I can't edit it. I get Disk I/O error. The disk is not full. Is there any way to fix the database? I think some kind of flag somewhere in the database has a wrong

Re: [sqlite] Fixing a database

2009-04-22 Thread Igor Tandetnik
Alberto Simoes wrote: > I am not sure what happened, but I have a database that opens > correctly with sqlite3 shell, I can select and query it, but I can't > edit it. I get Disk I/O error. The disk is not full. You don't have write permissions to the file, perhaps? Igor

Re: [sqlite] Fixing a database - solved

2009-04-22 Thread Alberto Simões
Hello On Wed, Apr 22, 2009 at 9:17 PM, Igor Tandetnik wrote: > Alberto Simoes > wrote: >> I am not sure what happened, but I have a database that opens >> correctly with sqlite3 shell, I can select and query it, but I can't >> edit it. I get Disk I/O

Re: [sqlite] Fixing a database

2009-04-22 Thread Jim Wilcoxson
I think it would be a good idea for sqlite3 to display a message like "Database opened for read-only" if you don't have permission to write. I saw this problem myself where a rollback was necessary from a previous root process, and as a new SQLite user, it was confusing and made me think "great,

[sqlite] Sporadic freezes of sqlite

2009-04-22 Thread Pavel Ivanov
Hi, all! I have an application written using sqlite. It writes into the database very intensively. And I noticed that it works nice and very fast but from time to time it just freezes for several seconds (I've registered freezes up to 8 secs). After some tracing of sqlite code I've found that all

Re: [sqlite] create the trigger to delete the data from other database

2009-04-22 Thread Kees Nuyt
On Wed, 22 Apr 2009 10:33:18 -0700 (PDT), Joanne Pham wrote: >Hi All, >Can we have the trigger to delete to data from different database? >My application has 2 databases and when ever the application is >deleting the rows in one of tables in DB1 I would like to have a

Re: [sqlite] Sporadic freezes of sqlite

2009-04-22 Thread Doug Currie
On Apr 22, 2009, at 4:38 PM, Pavel Ivanov wrote: > I've tried to set pragma synchronous = on (it's off by default for > me), but it makes application to work 5 times slower which is not > acceptable for me. I would be happy if there was some solution in > between that, i.e. for example just a

[sqlite] Transaction commit performance

2009-04-22 Thread Alessandro Merolli
Hi all, I'm working on a project that makes massively usage of SQL statements with many inserts/selects. It's a multi-threaded process that shares a certain amount of SQLite "connections" to be used by other process through an IPC layer. The connections are created at startup and 5

Re: [sqlite] Transaction commit performance

2009-04-22 Thread Igor Tandetnik
Alessandro Merolli wrote: > Most of the time, the statements requested are > grouped into a database transaction like this: > > BEGIN TRANSACTION; > INSERT INTO TBTEST (X,Y,Z) SELECT X,Y,Z FROM TBDATA JOIN ... ; > DELETE FROM TBTEST WHERE X NOT IN (SELECT ); >

Re: [sqlite] Sporadic freezes of sqlite

2009-04-22 Thread Pavel Ivanov
Yes, this could be an option. Although as you pointed it yourself including rand() and doing it on all statements in code here and there is not very convenient. I thought myself about turning synchronous on and changing somehow sqlite3_io_methods functions where xSync will do its job once in

[sqlite] How to check compiler options being used

2009-04-22 Thread Joanne Pham
Hi All, I am current used the SQLite 3.5.9 and SQLite library are compiled by someone and I would like to check all what are the compiler options being used? How to check the compiler options in this case? Thanks, JP ___ sqlite-users

Re: [sqlite] How to check compiler options being used

2009-04-22 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Joanne Pham wrote: > How to check the compiler options in this case? You can use 'nm' to see which symbols are present so that will help track functions that have been included or excluded from which you can deduce some flags. gcc does embed some

Re: [sqlite] How to check compiler options being used

2009-04-22 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Roger Binns wrote: > However the actual compiler flags (eg -O, -DXXX) are not recorded > by default in object files or libraries. If you are using gcc 4.2 or later then you can add -frecord-gcc-switches to the compile line and they will be recorded

Re: [sqlite] How to check compiler options being used

2009-04-22 Thread Joanne Pham
Hi All, It didn't work - I am using version 3.5.9 and my application is used the library libsqlite3.so.8.6 but I have no ideas what are the compiler option being used. Any help please. Thanks, JP From: Roger Binns To: General

Re: [sqlite] How to check compiler options being used

2009-04-22 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Joanne Pham wrote: > It didn't work What didn't work. > I am using version 3.5.9 and my application is used the library > libsqlite3.so.8.6 but I have no ideas what are the compiler option being used. That question was already answered (in short

[sqlite] Bizarre sqlite3 idiocyncrasy

2009-04-22 Thread Rosemary Alles
Hullo all, Including the following in my c-program: sql_rc = sqlite3_open_v2(database_name, _db, SQLITE_OPEN_READONLY, NULL); if (sql_rc != SQLITE_OK) { fprintf(stderr, "Function:%s

Re: [sqlite] TEMP_STORE not working ?(3.5.9)

2009-04-22 Thread Kris Groves
Hi, Just want to bump this, I really need to get to the bottom of this. Thanks for any info, Kris. Kris Groves wrote: > Hi, > From what I understand : > - default behavior is to use files for temporary stuff. > - the directory that will be used for these temporary files can be > defined via