[sqlite] How do i set up a table locking mode???

2014-01-23 Thread nskim
Dear sqlite family hi, how are you~?? I want to set up a table locing mode. So.. I put sqlite3_enable_shared_cache(1) on main function code of shell.c , then compiled , then excuted two sqlite shell processor. First shell processor set write_transaction (ex, begin; insert into table1

Re: [sqlite] latest sqlite 3 with Delphi 5 professional

2014-01-23 Thread Clemens Ladisch
dean gwilliam wrote: > I'm just wondering what my options are here? Many. What exactly do you want to know? What is your goal? Regards, Clemens ___ sqlite-users mailing list sqlite-users@sqlite.org

Re: [sqlite] How do i set up a table locking mode???

2014-01-23 Thread Hick Gunter
Shared cache table locking works for threads within a single process. You have two distinct processes and they synchronize on the database (file locking) level. -Ursprüngliche Nachricht- Von: nskim [mailto:k...@kangwon.ac.kr] Gesendet: Donnerstag, 23. Jänner 2014 09:43 An:

Re: [sqlite] latest sqlite 3 with Delphi 5 professional

2014-01-23 Thread dean gwilliam
On 23/01/2014 08:45, Clemens Ladisch wrote: dean gwilliam wrote: I'm just wondering what my options are here? Many. What exactly do you want to know? What is your goal? Regards, Clemens ___ sqlite-users mailing list sqlite-users@sqlite.org

Re: [sqlite] latest sqlite 3 with Delphi 5 professional

2014-01-23 Thread dean gwilliam
On 23/01/2014 08:45, Clemens Ladisch wrote: What exactly do you want to know? What is your goal? More specifically...is there the equivalent of that powerbasic include file for D5 i.e. that enables you to access the dll's function calls unchanged? Failing that...anything that will let me

Re: [sqlite] latest sqlite 3 with Delphi 5 professional

2014-01-23 Thread Ralf Junker
On 23.01.2014 11:28, dean gwilliam wrote: More specifically...is there the equivalent of that powerbasic include file for D5 i.e. that enables you to access the dll's function calls unchanged? Failing that...anything that will let me work with the latest sqlite 3 dll The meaner and leaner...the

Re: [sqlite] latest sqlite 3 with Delphi 5 professional

2014-01-23 Thread Clemens Ladisch
dean gwilliam wrote: > On 23/01/2014 08:45, Clemens Ladisch wrote: >> What exactly do you want to know? What is your goal? > > my goal is to be able to use sqlite 3 in my delphi 5 programs by, > ideally, accessing the raw sqlite api [...] > I mostly compile the amalgamation into the code I use my

Re: [sqlite] Why must WITHOUT ROWID tables have PRIMARY KEYs?

2014-01-23 Thread Eleytherios Stamatogiannakis
First of all please excuse me for bringing forth again a conversation that is months old. I've just discovered the "without rowid" ability of SQLite and i have to say many many thanks for it. Let me describe a use case where a not unique key and without rowid are most welcome. We have a

Re: [sqlite] Clang 3.3 and Scan-Build results

2014-01-23 Thread Jan Nijtmans
2014/1/23 Richard Hipp : > At this point you are likely to find lots of compiler warnings. Do not > worry about those. I'm looking for incorrect behavior and/or bad > query-planner decisions, not compiler warnings. We'll deal with the > compiler warnings over the coming weeks.

Re: [sqlite] latest sqlite 3 with Delphi 5 professional

2014-01-23 Thread dean gwilliam
Clemens, Ralph Thank you very much for your detailed advice on the subject. So far my options are 1) the dll + http://code.google.com/p/hiasm/source/browse/elements/delphi/code/SqLite3Api.pas 2) linking an obj file made using e.g. BC5.5 3) using wrappers off the net 4) using DISQLite3 pro

[sqlite] Application statically linked with sqlite3.6 creates sqlite2.1 files

2014-01-23 Thread Joachim Bürmann
Hello all, I'm very confused about a strange case. Maybe someone can lighten me up. We have an application (a serial analyzer) which stores its project settings in a sqlite3 database file. Our application is statically linked with sqlite3.6 (build from the sources and with SQLITE_THREADSAFE=1).

Re: [sqlite] Application statically linked with sqlite3.6 creates sqlite2.1 files

2014-01-23 Thread Simon Slavin
On 23 Jan 2014, at 1:58pm, Joachim Bürmann wrote: > On a certain customer system (Windows7 64bit) the application cannot > read the example project files (created with sqlite3.6 library). And > when the user stores his own settings in a new project, the project file > is

Re: [sqlite] Application statically linked with sqlite3.6 creates sqlite2.1 files

2014-01-23 Thread Joachim Bürmann
Hello Simon, thank you for your fast response. > On 23 Jan 2014, at 1:58pm, Joachim Bürmann wrote: > > > On a certain customer system (Windows7 64bit) the application cannot > > read the example project files (created with sqlite3.6 library). And > > when the user stores

Re: [sqlite] Application statically linked with sqlite3.6 creates sqlite2.1 files

2014-01-23 Thread Teg
Hello Joachim, If you run it in the debugger, break it then look at the loaded modules. That'll tell you if the Sqlite dll got loaded somehow. I'd suspect some other part of the program might be loading the DLL manually and hooking the function calls. You could load DLL through ordinals

[sqlite] Transaction behaviour

2014-01-23 Thread Joseph L. Casale
I have a scenario where I am writing a series of entries across several tables with relationships using Python and context managers. The sql is abstracted away from the user by a class providing all the needed methods. These each open implicit transactions, now its been asked that during the bulk

[sqlite] Segfault in pager_write_pagelist

2014-01-23 Thread Jakob Blomer
Hi, we use SQLite inside a fuse file system that runs in a number of computer centers. (Only) one of these centers recently reported several segfaults that happened on several nodes at different times but they all occur at the same spot in the code. The stack trace as far as SQLite is concerned

[sqlite] Delay to SQLite testing

2014-01-23 Thread Simon Slavin
Thought you guys might get a blast out of a reason that SQLite testing has been delayed: [Safe for work. No sound.] Simon. ___ sqlite-users mailing list sqlite-users@sqlite.org

Re: [sqlite] Why must WITHOUT ROWID tables have PRIMARY KEYs?

2014-01-23 Thread Drake Wilson
Quoth Eleytherios Stamatogiannakis , on 2014-01-23 14:37:23 +0200: > Let me describe a use case where a not unique key and without rowid > are most welcome. We have a distributed big data system here which > uses SQLite for the partitions. To be able to efficiently execute >

[sqlite] SELECTing from another SELECT

2014-01-23 Thread jose isaias cabrera
Greetings! I have these tables A and B: A id,projid,a,b 1,1,'a','h' 2,2,'b','i' 3,3,'c','j' 4,4,'d','k' 5,5,'e','l' ... ... B id,projid,ptask 101,1,'a' 102,2,'b' 103,3,'a' 104,4,'b' 105,5,'a' ... ... When I do this SELECT, SELECT * FROM A WHERE projid = (SELECT projid FROM B WHERE ptask =

Re: [sqlite] SELECTing from another SELECT

2014-01-23 Thread St. B.
SELECT * FROM A WHERE projid in (SELECT projid FROM B WHERE ptask = 'a'); will probably fill the bill. If I where to run your query, I would do a select A.* from A inner join B on A.a = b.ProjId where b.ptask='a' the join may optimize better than the in (select ...) On Thu, Jan 23, 2014 at

Re: [sqlite] SELECTing from another SELECT

2014-01-23 Thread jose isaias cabrera
Igor Tandetnik wrote... On 1/23/2014 2:11 PM, jose isaias cabrera wrote: SELECT * FROM A WHERE projid = (SELECT projid FROM B WHERE ptask = 'a'); You want WHERE projid IN (SELECT ...) IN operator accepts a set on the right; = operator only accepts a scalar (which comes from the first row

Re: [sqlite] SELECTing from another SELECT

2014-01-23 Thread Igor Tandetnik
On 1/23/2014 2:11 PM, jose isaias cabrera wrote: SELECT * FROM A WHERE projid = (SELECT projid FROM B WHERE ptask = 'a'); You want WHERE projid IN (SELECT ...) IN operator accepts a set on the right; = operator only accepts a scalar (which comes from the first row of the sub-select). --

Re: [sqlite] Transaction behaviour

2014-01-23 Thread Igor Tandetnik
On 1/23/2014 11:30 AM, Joseph L. Casale wrote: is there anything about transactions I am not seeing where I can accomplish leaving the bulk load uncommitted in the event of an issue in my case? I'm not sure I understand the nature of the difficulty. If you don't want to COMMIT a transaction,

Re: [sqlite] SELECTing from another SELECT

2014-01-23 Thread John McKown
On Thu, Jan 23, 2014 at 1:11 PM, jose isaias cabrera wrote: > > Greetings! > > I have these tables A and B: > A > id,projid,a,b > 1,1,'a','h' > 2,2,'b','i' > 3,3,'c','j' > 4,4,'d','k' > 5,5,'e','l' > ... > ... > > > B > id,projid,ptask > 101,1,'a' > 102,2,'b' > 103,3,'a' >

Re: [sqlite] SELECTing from another SELECT

2014-01-23 Thread jose isaias cabrera
John McKown wrote... On Thu, Jan 23, 2014 at 1:11 PM, jose isaias cabrera wrote: Greetings! I have these tables A and B: A id,projid,a,b 1,1,'a','h' 2,2,'b','i' 3,3,'c','j' 4,4,'d','k' 5,5,'e','l' ... ... B id,projid,ptask 101,1,'a' 102,2,'b' 103,3,'a' 104,4,'b'

Re: [sqlite] SELECTing from another SELECT

2014-01-23 Thread jose isaias cabrera
St. B. wrote... SELECT * FROM A WHERE projid in (SELECT projid FROM B WHERE ptask = 'a'); will probably fill the bill. If I where to run your query, I would do a select A.* from A inner join B on A.a = b.ProjId where b.ptask='a' the join may optimize better than the in (select ...) Thanks.

Re: [sqlite] SELECTing from another SELECT

2014-01-23 Thread Igor Tandetnik
On 1/23/2014 2:26 PM, St. B. wrote: SELECT * FROM A WHERE projid in (SELECT projid FROM B WHERE ptask = 'a'); will probably fill the bill. If I where to run your query, I would do a select A.* from A inner join B on A.a = b.ProjId where b.ptask='a' Careful - this will produce a different

Re: [sqlite] Transaction behaviour

2014-01-23 Thread Kees Nuyt
On Thu, 23 Jan 2014 16:30:57 +, "Joseph L. Casale" wrote: >I have a scenario where I am writing a series of entries across several tables >with relationships using Python and context managers. The sql is abstracted >away from the user by a class providing all the

Re: [sqlite] Clang 3.3 and Scan-Build results

2014-01-23 Thread big stone
Performance of 3.8.3 beta sqlite-amalgamation-201401221923 on windows7 For "CTE recursive" in memory 'batch' workload (sudoku): - latest beta is quicker than previous 3.8.3 beta : . by 7% with one "recursive table", . by 15% with two nested "recursive table". For "normal" in memory 'batch'

Re: [sqlite] System.Data.SQLite - System.MissingMethodException was unhandled

2014-01-23 Thread Joe Mistachkin
Bo Gusman wrote: > > System.MissingMethodException was unhandled >Message="Could not load type 'System.Data.SQLite.SQLiteConnection' > from assembly 'System.Data.SQLite, Version=1.0.90.0, Culture=neutral, > PublicKeyToken=1FDB50B1B62B4C84'." > What method is it trying to call at that

Re: [sqlite] Transaction behaviour

2014-01-23 Thread Joseph L. Casale
> Start the bulk load with "BEGIN IMMEDIATE;" or "BEGIN > EXCLUSIVE;" and count errors. > If there were no errors at the end of the bulk load, issue > "COMMIT;", else issue "ROLLBACK". > If the program crashes, sqlite will take care of the rollback > automatically the next time any process opens

Re: [sqlite] System.Data.SQLite - System.MissingMethodException was unhandled

2014-01-23 Thread Bo Gusman
Thanks for the reply, Joe. I truly appreciate it. On 1/23/2014 13:47, Joe Mistachkin wrote: Bo Gusman wrote: System.MissingMethodException was unhandled Message="Could not load type 'System.Data.SQLite.SQLiteConnection' from assembly 'System.Data.SQLite, Version=1.0.90.0,

Re: [sqlite] Why must WITHOUT ROWID tables have PRIMARY KEYs?

2014-01-23 Thread Elefterios Stamatogiannakis
On 23/1/2014 7:12 μμ, Drake Wilson wrote: Quoth Eleytherios Stamatogiannakis , on 2014-01-23 14:37:23 +0200: Let me describe a use case where a not unique key and without rowid are most welcome. We have a distributed big data system here which uses SQLite for the partitions.

Re: [sqlite] Transaction behaviour

2014-01-23 Thread Igor Tandetnik
On 1/23/2014 5:12 PM, Joseph L. Casale wrote: The bulk load doesn't have to be done this way, only one process loads data and even a single connection can be used but that would segment the wrapper. SQLite transaction is a property of a database connection - there ain't no such thing as a

Re: [sqlite] System.Data.SQLite - System.MissingMethodException was unhandled

2014-01-23 Thread Joe Mistachkin
Bo Gusman wrote: > > In my simple test project, it is failing when attempting to open the > connection. The same is true in the larger project with the 0.87 version > that has been working for months (and is now failing). > The 1.0.87.0 and 1.0.90.0 releases for the .NET Compact Framework

Re: [sqlite] System.Data.SQLite - System.MissingMethodException was unhandled

2014-01-23 Thread Bo Gusman
On 1/23/2014 15:08, Joe Mistachkin wrote: I have no idea what would cause 1.0.87.0 to stop working when it was working before. Has anything about the device itself or operating system changed? I can't rule it out, but I've not done anything with the device or the code since before the

Re: [sqlite] Transaction behaviour

2014-01-23 Thread Joseph L. Casale
> SQLite transaction is a property of a database connection - there ain't > no such thing as a transaction spanning multiple connections. In hindsight, I completely overlooked that very point. Between then and now it's all been refactored to do this correctly. Thanks everybody! jlc

Re: [sqlite] SELECTing from another SELECT

2014-01-23 Thread James K. Lowden
On Thu, 23 Jan 2014 13:28:50 -0600 John McKown wrote: > > SELECT * FROM A WHERE projid = (SELECT projid FROM B WHERE ptask = > > 'a'); > > > > This only returns one record (record 1) where it should return all > > the records with ptask = 'a'. > > No, it is

[sqlite] csv export

2014-01-23 Thread Frantisek Cerven
Hello, I want to ask you if is any way to call sqlite special commands programatically from c#. E.g. I need something like this in code not in command line: sqlite> .mode csv sqlite> .output test.csv sqlite> select * from tbl1; sqlite> .output stdout If not, what is the quicker way to export