Re: [sqlite] Delete From Not Working Properly

2014-02-21 Thread Geo Wil
I got it working finally. There were several problems that were all contributing and it was not until Kees suggested looking at the begins/commits to see if errors were happening that I saw the whole picture. As mentioned in my past response to the thread, the code worked when saving after

Re: [sqlite] Delete From Not Working Properly

2014-02-21 Thread Simon Slavin
On 21 Feb 2014, at 9:15pm, Geo Wil wrote: > I checked to see if sqlite3_step was producing an error but it was sending > back a value of 101 or SQLITE_DONE but the table data remained unchanged. Putting this sentence together with the 'Subject' header, it might just be

Re: [sqlite] Delete From Not Working Properly

2014-02-21 Thread RSmith
On 2014/02/22 01:37, Geo Wil wrote: As for the fail path issue, it is not an issue or at least it has never been for me. The way I understand it is that if you just put the file name into a function requesting a path in Windows it will look in the folder the process is running from for that

Re: [sqlite] Delete From Not Working Properly

2014-02-21 Thread Igor Tandetnik
On 2/21/2014 6:37 PM, Geo Wil wrote: As for the fail path issue, it is not an issue or at least it has never been for me. The way I understand it is that if you just put the file name into a function requesting a path in Windows it will look in the folder the process is running from for that

Re: [sqlite] Delete From Not Working Properly

2014-02-21 Thread Geo Wil
I thought of another possible reason why this is going on. The code in question works under one set of circumstances and not under another. If there is no data in my database then I am able to save data. This begged the question "why?" and the answer is because I do not load my data if I start

Re: [sqlite] Delete From Not Working Properly

2014-02-21 Thread RSmith
On 2014/02/22 00:32, Geo Wil wrote: 1. Windows 7 Ultimate 64-bit 2. Here is the path I am using: void Database::openSave(bool* bErrors) { if (sqlite3_open("*scSave.sqlite*",) != SQLITE_OK) { *bErrors = true; createBInfo(); d.createBReport("SQL Code

Re: [sqlite] Delete From Not Working Properly

2014-02-21 Thread Geo Wil
1. Windows 7 Ultimate 64-bit 2. Here is the path I am using: void Database::openSave(bool* bErrors) { if (sqlite3_open("*scSave.sqlite*",) != SQLITE_OK) { *bErrors = true; createBInfo(); d.createBReport("SQL Code 1",sqlite3_errmsg(dBase),bLocale +

Re: [sqlite] Delete From Not Working Properly

2014-02-21 Thread Richard Hipp
Please consider adding an error and warning log ( http://www.sqlite.org/errlog.html) to your program to record any errors that SQLite might be encountering. On Fri, Feb 21, 2014 at 4:15 PM, Geo Wil wrote: > Hello, > > Yesterday, while working on my game, I noticed that my

Re: [sqlite] Delete From Not Working Properly

2014-02-21 Thread Kees Nuyt
On Fri, 21 Feb 2014 14:15:10 -0700, Geo Wil wrote: >Hello, > >Yesterday, while working on my game, I noticed that my game data was not >updating in my save SQLite3 database. So I started tracking down what was >going on and eventually my search lead me to my dData function.

[sqlite] Delete From Not Working Properly

2014-02-21 Thread Geo Wil
Hello, Yesterday, while working on my game, I noticed that my game data was not updating in my save SQLite3 database. So I started tracking down what was going on and eventually my search lead me to my dData function. How this function works is that you pass a table name and a bool, the bool is

Re: [sqlite] partially excluding records

2014-02-21 Thread mm.w
Hello I would simply inner join, then filtering. Best Regards. On Fri, Feb 21, 2014 at 12:11 PM, David Bicking wrote: > > > On Fri, 2/21/14, Igor Tandetnik wrote: > > Subject: Re: [sqlite] partially

Re: [sqlite] partially excluding records

2014-02-21 Thread Igor Tandetnik
On 2/21/2014 3:11 PM, David Bicking wrote: But I am curious, wouldn't this yield a "Statuses" for key 2 of 'C+', when it should be 'O'? You could use the same technique there. The technique lets you know whether you have only C's, only non-C's, or a mix of the two, and act accordingly.

Re: [sqlite] partially excluding records

2014-02-21 Thread David Bicking
On Fri, 2/21/14, Igor Tandetnik wrote: Subject: Re: [sqlite] partially excluding records To: sqlite-users@sqlite.org Date: Friday, February 21, 2014, 2:58 PM On 2/21/2014 1:23 PM, David Bicking wrote: >> SELECT Key,

Re: [sqlite] partially excluding records

2014-02-21 Thread David Bicking
On Fri, 2/21/14, Clemens Ladisch wrote: Subject: Re: [sqlite] partially excluding records To: sqlite-users@sqlite.org Date: Friday, February 21, 2014, 1:38 PM David Bicking wrote: >> The complication is that if a given key

Re: [sqlite] partially excluding records

2014-02-21 Thread Igor Tandetnik
On 2/21/2014 1:23 PM, David Bicking wrote: SELECT Key, COUNT(STATUS) Cnt , MIN(STATUS) || CASE WHEN COUNT(STATUS)>1 THEN '+' ELSE '' END Statuses FROM T1 WHERE ... GROUP BY KEY; Key Cnt Statuses 1 2 O 2 1 C 4 2 O+ The complication is that if a given key has any

Re: [sqlite] partially excluding records

2014-02-21 Thread David Bicking
On Fri, 2/21/14, RSmith wrote: Subject: Re: [sqlite] partially excluding records To: sqlite-users@sqlite.org Date: Friday, February 21, 2014, 1:34 PM On 2014/02/21 20:23, David Bicking wrote: > I have a table like > >

Re: [sqlite] Time taken to perform checkpoint operation and does it lock database during this operation?

2014-02-21 Thread veeresh kumar
I guess this is what happening in my application. The WAL size has grown to 1 GB...But again my concern is why each commit is taking long time. I see a big pause before commit happens. In a multi-threaded application, sqlite may have below limitations. Is this a fair statement? - Response

Re: [sqlite] partially excluding records

2014-02-21 Thread Clemens Ladisch
David Bicking wrote: > The complication is that if a given key has any non-C value, the C values are > to be excluded. First, just exclude all C values: ... WHERE Status <> 'C' ... > If there are only C values, they are to be included. Then do the same query again, but with the all-C keys:

Re: [sqlite] partially excluding records

2014-02-21 Thread RSmith
On 2014/02/21 20:23, David Bicking wrote: I have a table like SELECT * FROM T1; Key Status 1 O 1 O 2 O 2 C 3 C 3 C 4 O 4 P Now, I need to consolidate that data. SELECT Key, COUNT(STATUS) Cnt , MIN(STATUS) || CASE WHEN COUNT(STATUS)>1 THEN '+' ELSE ''

[sqlite] partially excluding records

2014-02-21 Thread David Bicking
I have a table like SELECT * FROM T1; Key Status 1 O 1 O 2 O 2 C 3 C 3 C 4 O 4 P Now, I need to consolidate that data. SELECT Key, COUNT(STATUS) Cnt , MIN(STATUS) || CASE WHEN COUNT(STATUS)>1 THEN '+' ELSE '' END Statuses FROM T1 WHERE ... GROUP BY KEY;

Re: [sqlite] Problem with .mode line

2014-02-21 Thread RSmith
On 2014/02/20 16:58, pelek wrote: indeed ! I tried to open same file with Programers Notepad and file looked exacly like I need. But when I was opening file in standard windows notepad then I got whole CREATE TABLE code in one line! It is problem for me, because I am trying to open same file

Re: [sqlite] Problem with .mode line

2014-02-21 Thread mm.w
hello, this is only a problem of carriage returns or/and line feed. http://notepad-plus-plus.org/ Best Regards. On Thu, Feb 20, 2014 at 6:58 AM, pelek wrote: > indeed ! I tried to open same file with Programers Notepad and file looked > exacly like I need. But when I was

Re: [sqlite] Wrong filename handling in sqlite3_load_extension() for Cygwin

2014-02-21 Thread Jan Nijtmans
2014-02-20 14:39 GMT+01:00 Jan Nijtmans : > The function sqlite3_load_extension() on Cygwin expects a > win32 path, even though it is compiled for Cygwin. Here is a new version of my patch which fixes this bug, which handles better the case that the path does not contain

Re: [sqlite] Latest Sqlite grammar as machine understandable file

2014-02-21 Thread Max Vlasov
On Fri, Feb 21, 2014 at 5:24 PM, Richard Hipp wrote: > On Fri, Feb 21, 2014 at 7:29 AM, Max Vlasov wrote: > >> >> The only one a little similar I found is >> http://www.sqlite.org/docsrc/artifact/873cf35adf14cf34 >> ( mentioned as

Re: [sqlite] Latest Sqlite grammar as machine understandable file

2014-02-21 Thread Richard Hipp
On Fri, Feb 21, 2014 at 7:29 AM, Max Vlasov wrote: > Hi, > > Is there a machine-readable (BNF or other) grammar as equivalent to > the current syntax diagrams? > http://www.sqlite.org/syntaxdiagrams.html > > The only one a little similar I found is >

Re: [sqlite] Latest Sqlite grammar as machine understandable file

2014-02-21 Thread Richard Hipp
On Fri, Feb 21, 2014 at 8:09 AM, Max Vlasov wrote: > On Fri, Feb 21, 2014 at 4:47 PM, Richard Hipp wrote: > > On Fri, Feb 21, 2014 at 7:29 AM, Max Vlasov > wrote: > > > >> Is there a machine-readable (BNF or other) grammar as

Re: [sqlite] Latest Sqlite grammar as machine understandable file

2014-02-21 Thread Max Vlasov
On Fri, Feb 21, 2014 at 4:47 PM, Richard Hipp wrote: > On Fri, Feb 21, 2014 at 7:29 AM, Max Vlasov wrote: > >> Is there a machine-readable (BNF or other) grammar as equivalent to > > Not that I am aware of. > I just noticed the file (

Re: [sqlite] Latest Sqlite grammar as machine understandable file

2014-02-21 Thread Richard Hipp
On Fri, Feb 21, 2014 at 7:29 AM, Max Vlasov wrote: > Hi, > > Is there a machine-readable (BNF or other) grammar as equivalent to > the current syntax diagrams? > http://www.sqlite.org/syntaxdiagrams.html > Not that I am aware of. -- D. Richard Hipp d...@sqlite.org

[sqlite] Latest Sqlite grammar as machine understandable file

2014-02-21 Thread Max Vlasov
Hi, Is there a machine-readable (BNF or other) grammar as equivalent to the current syntax diagrams? http://www.sqlite.org/syntaxdiagrams.html The only one a little similar I found is http://www.sqlite.org/docsrc/artifact/873cf35adf14cf34 ( mentioned as art/syntax/all-bnf.html ) but it's

Re: [sqlite] Problem with .mode line

2014-02-21 Thread pelek
indeed ! I tried to open same file with Programers Notepad and file looked exacly like I need. But when I was opening file in standard windows notepad then I got whole CREATE TABLE code in one line! It is problem for me, because I am trying to open same file with c# code. Unfortunetly c# is

Re: [sqlite] Proposed enhancement to the sqlite3.exe command-line shell

2014-02-21 Thread RSmith
On 2014/02/21 11:54, _ph_ wrote: Suggestion: Warning banner, and a .saveas command that copies the db to a file. (I haven't read the entire thread, sorry if this already came up.) There is usually no call to read an entire thread, unless you decide to actually post an opinion, in which case

Re: [sqlite] Proposed enhancement to the sqlite3.exe command-line shell

2014-02-21 Thread _ph_
Suggestion: Warning banner, and a .saveas command that copies the db to a file. (I haven't read the entire thread, sorry if this already came up.) -- View this message in context: