Re: [sqlite] Visual Studio EE 2010

2011-05-12 Thread Don Ireland
Thanks. I'll give that a test in the morning and let you know the results. Don Ireland -Original Message- From: "Afriza N. Arief" To: General Discussion of SQLite Database Sent: Thu, 12 May 2011 11:25 PM Subject: Re: [sqlite] Visual Studio

Re: [sqlite] Visual Studio EE 2010

2011-05-12 Thread Afriza N. Arief
On Fri, May 13, 2011 at 10:10 AM, Don Ireland wrote: > I'm using C++/CLI & downloaded/installed the dotnet file at the link you > provided. > > After doing so, I found several DLL files in two folders: bin & GAD (I > believe that's the name). > > Don Ireland > > Hi, Try

Re: [sqlite] Unhandled Exception: System.DllNotFoundException: Unable to load DLL 'SQLite.Interop.DLL

2011-05-12 Thread Kevin Benson
On Thu, May 12, 2011 at 7:56 PM, Jim O'Brien wrote: > I have installed sqlite-dotnet-x86-1007200 (using Full Install) > > I have a simple program to test System.Data.SQLite. > > It is compiled using 2008 C# Express (no ability to change target CPU) with > all the proper

Re: [sqlite] Can I dynamically select a table?

2011-05-12 Thread Igor Tandetnik
On 5/12/2011 10:20 PM, John wrote: > These are the names of actual views in this example. Let me rename them: > >> insert into rules_table values (1, view10); >> insert into rules_table values (2, view20); >> insert into rules_table values (3, view30); >> insert into rules_table values (4,

Re: [sqlite] Can I dynamically select a table?

2011-05-12 Thread John
These are the names of actual views in this example. Let me rename them: > insert into rules_table values (1, view10); > insert into rules_table values (2, view20); > insert into rules_table values (3, view30); > insert into rules_table values (4, view40); On Thu, May 12, 2011 at 7:45 AM, Igor

Re: [sqlite] Common Multi-treaded Problem

2011-05-12 Thread Pavel Ivanov
> Pavel, could you please specify what do you mean by "statements in this > transaction"? Statements > that were prepared (sqlite3_prepare) or initiated (sqlite3_step) during the > transaction? Statements that were initiated during the transaction. > Also, is this something that one should

Re: [sqlite] Visual Studio EE 2010

2011-05-12 Thread Don Ireland
I'm using C++/CLI & downloaded/installed the dotnet file at the link you provided. After doing so, I found several DLL files in two folders: bin & GAD (I believe that's the name). Don Ireland -Original Message- From: "Afriza N. Arief" To: General Discussion of

Re: [sqlite] Common Multi-treaded Problem

2011-05-12 Thread Mihai Militaru
If you don't mind, John, for bullying in the discussion... On Thu, 12 May 2011 17:58:40 -0400 Pavel Ivanov wrote: > There's no dependency between different prepared statements, but there > is dependency between transactions as they use the same database. And > transaction

Re: [sqlite] Common Multi-treaded Problem

2011-05-12 Thread Pavel Ivanov
> Humm.  Resetting each prepared statement right after use seemed to work.  So > in review, a select prepared statement will lock the DB from other threads > (or is it DB connections?) but not the current thread (or is it DB > connection). Yes, you are right. Transactions and database locks

Re: [sqlite] Common Multi-treaded Problem

2011-05-12 Thread Simon Slavin
On 13 May 2011, at 1:33am, John Deal wrote: > Humm. Resetting each prepared statement right after use seemed to work. So > in review, a select prepared statement will lock the DB from other threads > (or is it DB connections?) but not the current thread (or is it DB > connection). I don't

Re: [sqlite] Multi-threading Common Problem

2011-05-12 Thread John Deal
Hello Roger, OK I see your point now. I could most likely remove the OS mutexes. Thanks, John --- On Thu, 5/12/11, Roger Binns wrote: > From: Roger Binns > Subject: Re: [sqlite] Multi-threading Common Problem > To: sqlite-users@sqlite.org >

Re: [sqlite] Common Multi-treaded Problem

2011-05-12 Thread John Deal
Hello Pavel, Humm. Resetting each prepared statement right after use seemed to work. So in review, a select prepared statement will lock the DB from other threads (or is it DB connections?) but not the current thread (or is it DB connection). Thanks for the help! John --- On Thu, 5/12/11,

[sqlite] Unhandled Exception: System.DllNotFoundException: Unable to load DLL 'SQLite.Interop.DLL

2011-05-12 Thread Jim O'Brien
I have installed sqlite-dotnet-x86-1007200 (using Full Install) I have a simple program to test System.Data.SQLite. It is compiled using 2008 C# Express (no ability to change target CPU) with all the proper references and usings. When I attempt to run it, I get the error "Unhandled

Re: [sqlite] Common Multi-treaded Problem

2011-05-12 Thread John Deal
Hello again Pavel, OK but I am a bit confused. What I have works as a single instance with one DB connection running under different threads as long as only one is using the DB connection at a time. This is with prepared statements "hanging" (not reset) with different threads using different

Re: [sqlite] Multi-threading Common Problem

2011-05-12 Thread John Deal
Hello Pavel, This makes sense but I have shared cache on. Thanks. --- On Thu, 5/12/11, Pavel Ivanov wrote: > From: Pavel Ivanov > Subject: Re: [sqlite] Multi-threading Common Problem > To: "General Discussion of SQLite Database"

Re: [sqlite] Common Multi-treaded Problem

2011-05-12 Thread Pavel Ivanov
> Interesting is the impression I had with prepared statements was the reset > was only necessary if you wanted to reuse that statement.  Since each each DB > connection is in its own instance of a class (with it own set of prepared > statements) I would not think there would be any dependency

Re: [sqlite] Multi-threading Common Problem

2011-05-12 Thread Pavel Ivanov
> "After a BEGIN EXCLUSIVE, no other database connection except for > read_uncommitted connections will be able to read the database and no other > connection without exception will be able to write the database until the > transaction is complete." > > This tells me that reads outside of a

Re: [sqlite] Multi-threading Common Problem

2011-05-12 Thread John Deal
Good question. Very possible my understanding is not complete. I have basically read and write transactions, each potentially with several accesses to the DB. I want to ensure that if a write transaction is happening, no read transactions are in progress since it would be possible to have

Re: [sqlite] fts virtual table questions

2011-05-12 Thread Richard Hipp
On Thu, May 12, 2011 at 4:07 PM, Paul Shaffer wrote: > I didn't get an answer to my earlier question on fts. I guess it's > difficult area. > > Should an fts virtual table always be re-created from scratch when the > database is opened by the application before you start

[sqlite] fts virtual table questions

2011-05-12 Thread Paul Shaffer
I didn't get an answer to my earlier question on fts. I guess it's difficult area. Should an fts virtual table always be re-created from scratch when the database is opened by the application before you start using fts commands? I see that the fts tables are not deleted when the database is

Re: [sqlite] Common Multi-treaded Problem

2011-05-12 Thread John Deal
Hello Igor, That very well maybe it. I am not at home so can't test for sure but I reset the prepared statements right before I use them so they are left hanging if another thread came in. Interesting is the impression I had with prepared statements was the reset was only necessary if you

Re: [sqlite] Multi-threading Common Problem

2011-05-12 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 05/12/2011 09:38 AM, John Deal wrote: > I have been working for weeks on this and I feel there must be something > simple I am overlooking. Why are you discarding SQLite's builtin and tested mutexes and then effectively reimplementing your own

Re: [sqlite] Visual Studio EE 2010

2011-05-12 Thread Don Ireland
For those that don't know: VSEE2010 = Visual Studio Express Edition 2010 Don Ireland -Original Message- From: Don Ireland To: General Discussion of SQLite Database Sent: Thu, 12 May 2011 12:17 PM Subject: Re: [sqlite] Visual Studio EE

[sqlite] Can't send messages to list from pc?

2011-05-12 Thread Don Ireland
I use Thunderbird on my laptop and also have an Imap client on my Android. I signed up for this list by sending a msg from Android. Both email clients send from the same address. But when I send a message from my pc, it seems to end up in a vacuum because it never appears on the list. Any

Re: [sqlite] Visual Studio EE 2010

2011-05-12 Thread Don Ireland
I'm using C++/CLI. Thanks. Don Ireland -Original Message- From: "Afriza N. Arief" To: General Discussion of SQLite Database Sent: Thu, 12 May 2011 11:23 AM Subject: Re: [sqlite] Visual Studio EE 2010 On Thu, May 12, 2011 at 11:18 PM, Don

Re: [sqlite] Transaction triggers?

2011-05-12 Thread Nico Williams
I believe I've got solutions to the various little problems I've run into. My experiments have helped me shed some light on what the semantics of DB triggers should be, to the point where I think I've reached stable conclusions about those semantics. I'm also ready to characterize performance

[sqlite] Multi-threading Common Problem

2011-05-12 Thread John Deal
Hello All, I have been using SQLite for a couple of years but have never posted to this list before. I am sure my problem is common and am looking for ideas to solve it. I have used SQLite extensively single-threaded with no problems (other than my own!). I am currently working on another

Re: [sqlite] Common Multi-treaded Problem

2011-05-12 Thread Igor Tandetnik
On 5/12/2011 12:31 PM, John Deal wrote: > When I allow multiple readers with each thread using a different DB > connection (open with the same flags) and each thread having > exclusive use of its DB connection (no sharing of connections) and if > more than one thread is reading the DB at the same

[sqlite] (no subject)

2011-05-12 Thread John Deal
Hello All, I have been using SQLite for a couple of years but have never posted to this list before. I am sure my problem is common and am looking for ideas to solve it. I have used SQLite extensively single-threaded with no problems (other than my own!). I am currently working on another

[sqlite] Common Multi-treaded Problem

2011-05-12 Thread John Deal
Hello All, I have been using SQLite for a couple of years but have never posted to this list before. I am sure my problem is common and am looking for ideas to solve it. I have basically the same situation as this thread: --- On Wed, Jan 26, 2011 at

Re: [sqlite] Visual Studio EE 2010

2011-05-12 Thread Afriza N. Arief
On Thu, May 12, 2011 at 11:18 PM, Don Ireland wrote: > I downloaded and installed sqlite-dotnet-x86-3070600.zip. > > But when I attempt to add it as preference in VSEE2010, I find several dll > files. But none of them results in me being able to include a SQLite.h > file.

Re: [sqlite] Example/Tutorial for "extension_functions.c" in C/C++ Prog With "sqlite3.c"

2011-05-12 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 05/10/2011 01:24 PM, Mays, Steve wrote: > Question 1.) Can "exentension_functions.c" be compiled along with > "sqlite3.c" into one executable? > > Question 2.) If so, how? > > Question 3.) If "exentension_functions.c" be compiled into one >

[sqlite] Visual Studio EE 2010

2011-05-12 Thread Don Ireland
I downloaded and installed sqlite-dotnet-x86-3070600.zip. But when I attempt to add it as preference in VSEE2010, I find several dll files. But none of them results in me being able to include a SQLite.h file. What am I doing wrong? Don Ireland ___

Re: [sqlite] Blob newbie problem

2011-05-12 Thread StyveA
Black, Michael (IS) wrote: > > Do I understand you're still seeing a segfault? I assume you're not > seeing your "Year retrieved..." statement? > > You haven't showed us your table definition. > > Change your strcmp to strcasecmp and see if that fixes it for you. > > Michael D. Black > >

Re: [sqlite] Blob newbie problem

2011-05-12 Thread Igor Tandetnik
StyveA wrote: > I tried with your tips, and I've seen that I was missing the call of my > callback function, and now the segfault is in it.. Personally, I vastly prefer sqlite3_step / sqlite3_column* interface to sqlite3_exec. I never use the latter except for

Re: [sqlite] Blob newbie problem

2011-05-12 Thread Black, Michael (IS)
Do I understand you're still seeing a segfault? I assume you're not seeing your "Year retrieved..." statement? You haven't showed us your table definition. Change your strcmp to strcasecmp and see if that fixes it for you. Michael D. Black Senior Scientist NG Information Systems

Re: [sqlite] Blob newbie problem

2011-05-12 Thread StyveA
Igor Tandetnik wrote: > > Prepare doesn't touch the database in any way. It just parses the text of > the statement, and prepares execution plan. Step is where the real work is > done. > > You need to issue BEGIN statement if you want to start an explicit > transaction (and then COMMIT or END

Re: [sqlite] Blob newbie problem

2011-05-12 Thread Igor Tandetnik
StyveA wrote: > For the COMMIT/END point, I though that sqlite_prepare(..) was sufficient > to do it, so Begin is mandatory? Prepare doesn't touch the database in any way. It just parses the text of the statement, and prepares execution plan. Step is where the real

Re: [sqlite] Blob newbie problem

2011-05-12 Thread StyveA
Igor Tandetnik wrote: > > StyveA wrote: >> I'm a newbie using sqlite3, and i'm trying to save in a database some >> blob >> datas (just string and integer), >> but I can't get my data back.. I just obtain a segfault.. >> I have searched in forums, but did'nt find

Re: [sqlite] Blob newbie problem

2011-05-12 Thread Igor Tandetnik
StyveA wrote: > I'm a newbie using sqlite3, and i'm trying to save in a database some blob > datas (just string and integer), > but I can't get my data back.. I just obtain a segfault.. > I have searched in forums, but did'nt find anything that could help me.. > > int

[sqlite] Blob newbie problem

2011-05-12 Thread StyveA
Hello, I'm a newbie using sqlite3, and i'm trying to save in a database some blob datas (just string and integer), but I can't get my data back.. I just obtain a segfault.. I have searched in forums, but did'nt find anything that could help me.. Here is my code :

Re: [sqlite] Can I dynamically select a table?

2011-05-12 Thread Igor Tandetnik
John wrote: > I don't see how that helps. Let's say I have table with rules which > determine from which view to select: > > create rules_table > (condition integer, myview integer); > > insert into rules_table values (1,10); > insert into rules_table values (2,20); > insert

Re: [sqlite] SQLITE return codes for insert/delete/update/select

2011-05-12 Thread George Brink
On 5/11/2011 3:52 PM, cricketfan wrote: > > I dont know if it is just me but I find the return codes for SQL operation > quite confusing. I am new to SQLITE, have learnt a few things and wanted to > know if going in the correct direction, You are thinking in the wrong direction. SQLITE_DONE means