[sqlite] Is there a way to select a precision?

2013-05-05 Thread Igor Korot
Hi, ALL, Is there a way to select a precision either on the call to sqlite3_bind_double() or before it? Other than the call to sprintf() Thank you. ___ sqlite-users mailing list sqlite-users@sqlite.org

[sqlite] B-Tree usage

2013-05-11 Thread Igor Korot
Hi, ALL, Looking at http://www.sqlite.org/eqp.html#section_1_2 it would be nice to mention in which case B-Tree is unavoidable. Only one use case with B-Tree vs indexing is used but from reading first paragraph it looks like indexing is B-Tree replacement everywhere. I have a query with ORDER BY

Re: [sqlite] B-Tree usage

2013-05-11 Thread Igor Korot
Hi, Nico, On Fri, May 10, 2013 at 11:07 PM, Nico Williams wrote: > It'd help if you posted a simplified schema and statements that are > not planned correctly by SQLite3. > I'm not saying that my statements are not planned correctly. What I'm saying is that by reading the

[sqlite] How do I optimize this?

2013-05-11 Thread Igor Korot
Hi, ALL, sqlite> EXPLAIN QUERY PLAN SELECT positions.positionname, positionsforleague.val ue FROM positionsforleague, positions, leagues WHERE leagues.id = positionsforle ague.id AND positions.positionid = positionsforleague.positionid AND leagues.nam e = "test"; 0|0|0|SCAN TABLE

Re: [sqlite] B-Tree usage

2013-05-11 Thread Igor Korot
Thank you. That clear things up. On Fri, May 10, 2013 at 11:28 PM, Nico Williams <n...@cryptonector.com>wrote: > On Sat, May 11, 2013 at 1:12 AM, Igor Korot <ikoro...@gmail.com> wrote: > > On Fri, May 10, 2013 at 11:07 PM, Nico Williams <n...@cryptonector.com > &g

[sqlite] Another 2 questions about SQLite

2013-06-30 Thread Igor Korot
Hi, ALL, 1. I'm trying to minimize the number of requests I'm doing to the DB. What I need is a way to count the number of rows that the query return to me prior to going thru the "sqlite3_step()". If this number is 0, I want to skip the processing and just return. It's not an error situation, it

Re: [sqlite] Another 2 questions about SQLite

2013-06-30 Thread Igor Korot
Simon, On Sun, Jun 30, 2013 at 7:41 PM, Simon Slavin <slav...@bigfraud.org> wrote: > > On 1 Jul 2013, at 3:27am, Igor Korot <ikoro...@gmail.com> wrote: > > > 1. I'm trying to minimize the number of requests I'm doing to the DB. > What > > I need

Re: [sqlite] Another 2 questions about SQLite

2013-06-30 Thread Igor Korot
On Sun, Jun 30, 2013 at 7:47 PM, Igor Tandetnik <i...@tandetnik.org> wrote: > On 6/30/2013 10:27 PM, Igor Korot wrote: > >> 1. I'm trying to minimize the number of requests I'm doing to the DB. What >> I need is a way to count the number of rows that the query return to m

[sqlite] What's best table schema?

2013-07-04 Thread Igor Korot
Hi, ALL, Consider following task/schema: CREATE TABLE leagues(id integer primary key, name char(50),); CREATE TABLE position(positionid integer foreign key, positionname char(10)); CREATE TABLE players(playerid integer primary key, name char(50), age integer, value integer, currvalue

Re: [sqlite] What's best table schema?

2013-07-04 Thread Igor Korot
Hi, Simon, On Thu, Jul 4, 2013 at 6:50 PM, Simon Slavin <slav...@bigfraud.org> wrote: > > On 5 Jul 2013, at 2:10am, Igor Korot <ikoro...@gmail.com> wrote: > > > CREATE TABLE players(playerid integer primary key, name char(50), age > > integer, value integer,

Re: [sqlite] What's best table schema?

2013-07-04 Thread Igor Korot
Moreover, I can't use rowid to communicate between playersinleague and playersposition tables Thank you. On Thu, Jul 4, 2013 at 7:27 PM, Igor Korot <ikoro...@gmail.com> wrote: > Hi, Simon, > > On Thu, Jul 4, 2013 at 6:50 PM, Simon Slavin <slav...@bigfraud.org> wrote:

[sqlite] Reference to an undefined field

2013-07-09 Thread Igor Korot
Hi, ALL, Consider following code: std::string query = "SELECT a FROM foo;"; sqlite3_prepare_v2( handle, query, -1, , 0 ); sqlite3_step( stmt ); int id = sqlite_column_int( stmt, 0 ); int code = sqlite3_column_int( stmt, 1 ); Shouldn't the engine assert in this case? Thank you.

Re: [sqlite] Reference to an undefined field

2013-07-09 Thread Igor Korot
Igor, On Tue, Jul 9, 2013 at 3:42 PM, Igor Tandetnik <i...@tandetnik.org> wrote: > On 7/9/2013 6:37 PM, Igor Korot wrote: > >> Hi, ALL, >> Consider following code: >> >> std::string query = "SELECT a FROM foo;"; >> >> sqlite3_prepare_v2(

Re: [sqlite] Where Clause

2013-08-02 Thread Igor Korot
Hi Why do you think it should return error? On Aug 2, 2013 1:15 AM, "techi eth" wrote: > Come across one issue with conditional query execution. > > Query: UPDATE COMPANY SET Name= 'test' WHERE ID = 2; > According to my understanding if no ID = 2 is present in table then

Re: [sqlite] Query problems

2013-09-01 Thread Igor Korot
Hi, Can you do "DESCRIBE QUERY PLAN " and post results here? Also, what do you mean by "unbearable at scale"? Did you measure it? What is the result? Thank you. On Sun, Sep 1, 2013 at 6:03 PM, Joseph L. Casale wrote: > I have a query that is unbearable at scale, for

Re: [sqlite] Query problems

2013-09-01 Thread Igor Korot
Hi, Joseph, On Sun, Sep 1, 2013 at 6:21 PM, Joseph L. Casale wrote: > > Hi, > > Can you do "DESCRIBE QUERY PLAN " and post results here? > > > > Also, what do you mean by "unbearable at scale"? Did you measure it? What > > is the result? > > > > Thank you. > > It

[sqlite] Is this code OK?

2013-09-19 Thread Igor Korot
Hi, ALL, Here is the code I'm trying to use: char *errmsg = NULL; sqlite3_exec( handle, "BEGIN", 0, 0, ); if( sqlite3_exec( , ) != SQLITE_OK ) { printf( "Error executing query: %s", sqlite3_errmsg( m_handle ) ); sqlite3_exec( handle, "ROLLBACK", 0, 0, ); } Can I reuse errmsg

Re: [sqlite] Is this code OK?

2013-09-19 Thread Igor Korot
Stephan, On Thu, Sep 19, 2013 at 12:46 AM, Stephan Beal <sgb...@googlemail.com>wrote: > On Thu, Sep 19, 2013 at 8:55 AM, Igor Korot <ikoro...@gmail.com> wrote: > > > Can I reuse errmsg variable like this or do I have to call sqlite3_free() > > and then execute &qu

Re: [sqlite] Is this code OK?

2013-09-19 Thread Igor Korot
Stephan, On Thu, Sep 19, 2013 at 1:09 AM, Stephan Beal <sgb...@googlemail.com> wrote: > On Thu, Sep 19, 2013 at 10:06 AM, Igor Korot <ikoro...@gmail.com> wrote: > > > OK, so I guess I have to call sqlite3_free(). > > Now, I do have to execute "ROLLBACK"

Re: [sqlite] Is this code OK?

2013-09-19 Thread Igor Korot
Hi, Simon, On Thu, Sep 19, 2013 at 5:16 AM, Simon Slavin wrote: > > On 19 Sep 2013, at 9:09am, Stephan Beal wrote: > > > What's the > > difference between and calling sqlite3_errmsg()? > > No difference in terms of the result, they're just to cope

Re: [sqlite] Is this code OK?

2013-09-19 Thread Igor Korot
Hi, Igor, On Thu, Sep 19, 2013 at 5:54 AM, Igor Tandetnik <i...@tandetnik.org> wrote: > On 9/19/2013 2:55 AM, Igor Korot wrote: > >> Here is the code I'm trying to use: >> >> char *errmsg = NULL; >> sqlite3_exec( handle, "BEGIN", 0, 0,

[sqlite] COMMIT or ROLLBACK failure

2013-09-19 Thread Igor Korot
Hi, ALL, Consider following piece of code: int res = sqlite3_exec(..., "BEGIN"... ); if( res != SQLITE_OK ) { printf( "Error occured on begin transaction. Please try again." ); return; } // some operations on the database // if operations are successful sqlite3_exec( ...,

Re: [sqlite] COMMIT or ROLLBACK failure

2013-09-19 Thread Igor Korot
On Thu, Sep 19, 2013 at 4:35 PM, Richard Hipp <d...@sqlite.org> wrote: > On Thu, Sep 19, 2013 at 5:50 PM, Igor Korot <ikoro...@gmail.com> wrote: > > > > > Now, AFAIU, I need to check if the COMMIT is successful. > > But what should I do if it fails? Do I j

[sqlite] sqlite3_last_insert_rowid() problem

2013-10-19 Thread Igor Korot
Hi, ALL, Looking at http://www.sqlite.org/c3ref/last_insert_rowid.html, I see that the function is declared as sqlite3_int64 sqlite3_last_insert_rowid(sqlite3*); I am trying to build my program in both MS Windows 7 64-bit using MSVC2010 for 32-bit solution and in Mac OSX Snow Leopard 10.6.8

Re: [sqlite] sqlite3_last_insert_rowid() problem

2013-10-19 Thread Igor Korot
Hi, Kevin, On Sat, Oct 19, 2013 at 2:59 AM, Kevin Benson <kevin.m.ben...@gmail.com>wrote: > On Sat, Oct 19, 2013 at 5:46 AM, Igor Korot <ikoro...@gmail.com> wrote: > > > but on Mac I am getting the warning: > > > > "Implicit conversion loses integer pre

Re: [sqlite] First time poster: need advise

2012-09-21 Thread Igor Korot
an error: The extension manifest is invalid. I have MSVC 2010 Professional with Windows 7 64-bit. However my project will be compiled in 32-bit mode. Any help will be appreciated. Thank you. On Thu, Sep 20, 2012 at 4:10 PM, Igor Korot <ikoro...@gmail.com> wrote: > Hi, ALL, > My name is

Re: [sqlite] First time poster: need advise

2012-09-21 Thread Igor Korot
Thank you. On Fri, Sep 21, 2012 at 5:41 AM, Igor Tandetnik <itandet...@mvps.org> wrote: > Igor Korot <ikoro...@gmail.com> wrote: >> I just tried to download both of those files. I added include path, >> library path and the dll. >> However, during linking of my p

Re: [sqlite] First time poster: need advise

2012-09-21 Thread Igor Korot
Igor, On Fri, Sep 21, 2012 at 5:40 AM, Igor Tandetnik <itandet...@mvps.org> wrote: > Igor Korot <ikoro...@gmail.com> wrote: >> When I tried to download the precompiled developmental package for >> Windows I saw the sqlite-dll-win32-x86-3071400.zip. However this file >

Re: [sqlite] Version issues on Mac after updating

2016-05-31 Thread Igor Korot
Hi, On Tue, May 31, 2016 at 11:01 AM, Dominique Devienne wrote: > On Tue, May 31, 2016 at 4:41 PM, Eric Kestler wrote: > >> Where does Sqlite actually reside when installed on a Mac? >> > > Probably *inside* navicat. > > When you build a native

[sqlite] Conversion failure

2016-06-23 Thread Igor Korot
Hi, I am trying to find out why the following code fails to do proper conversion. It works if the tableName have "abcd", but fails if it has "abcß" (the German letter for the "ss" (looks like Greek letter beta)). struct Table { std::wstring name; std::vector fields; std::vector

Re: [sqlite] Conversion failure

2016-06-23 Thread Igor Korot
lite.org] Im Auftrag von Igor > Korot > Gesendet: Donnerstag, 23. Juni 2016 16:39 > An: SQLite mailing list <sqlite-users@mailinglists.sqlite.org> > Betreff: Re: [sqlite] Conversion failure > > Hi, Clemens, > > On Thu, Jun 23, 2016 at 10:33 AM, Clemens Ladisch <clem..

Re: [sqlite] Conversion failure

2016-06-23 Thread Igor Korot
Hi, Clemens, On Thu, Jun 23, 2016 at 10:33 AM, Clemens Ladisch <clem...@ladisch.de> wrote: > Igor Korot wrote: >> I am trying to find out why the following code fails to do proper conversion. >> It works if the tableName have "abcd", but fails if it has "abc

Re: [sqlite] Conversion failure

2016-06-24 Thread Igor Korot
Simon, On Fri, Jun 24, 2016 at 11:44 AM, Simon Slavin <slav...@bigfraud.org> wrote: > > On 24 Jun 2016, at 4:37pm, Igor Korot <ikoro...@gmail.com> wrote: > >> Now are all those scenarios correct? >> Will me and my German friend be able to open each other d

Re: [sqlite] Conversion failure

2016-06-24 Thread Igor Korot
Simon, On Fri, Jun 24, 2016 at 11:13 AM, Simon Slavin <slav...@bigfraud.org> wrote: > > On 24 Jun 2016, at 3:55pm, Igor Korot <ikoro...@gmail.com> wrote: > >> Are those 3 scenarios correct? > > They are if the shell tool (or any other SQLite software) works the

Re: [sqlite] Conversion failure

2016-06-24 Thread Igor Korot
Simon, On Fri, Jun 24, 2016 at 11:34 AM, Igor Korot <ikoro...@gmail.com> wrote: > Simon, > > On Fri, Jun 24, 2016 at 11:13 AM, Simon Slavin <slav...@bigfraud.org> wrote: >> >> On 24 Jun 2016, at 3:55pm, Igor Korot <ikoro...@gmail.com> wrot

Re: [sqlite] Conversion failure

2016-06-24 Thread Igor Korot
Rowan et al, On Fri, Jun 24, 2016 at 4:34 AM, Rowan Worth <row...@dugeo.com> wrote: > On 24 June 2016 at 16:13, Simon Slavin <slav...@bigfraud.org> wrote: > >> On 24 Jun 2016, at 5:04am, Igor Korot <ikoro...@gmail.com> wrote: >> >> > But everythin

Re: [sqlite] Conversion failure

2016-06-24 Thread Igor Korot
On Fri, Jun 24, 2016 at 11:36 AM, Simon Slavin <slav...@bigfraud.org> wrote: > > On 24 Jun 2016, at 4:34pm, Igor Korot <ikoro...@gmail.com> wrote: > >> What do you mean? >> I'm talking here about the SQLite shell tool downloaded from the >> official web si

Re: [sqlite] Conversion failure

2016-06-24 Thread Igor Korot
Hi, On Fri, Jun 24, 2016 at 12:51 PM, R Smith wrote: > > > On 2016/06/24 6:11 PM, Simon Slavin wrote: >> >> The ALT+num system for entering unusual characters is a Windows thing. On >> a Mac you do it by picking the character from a virtual keyboard shown on >> the display,

Re: [sqlite] Conversion failure

2016-06-23 Thread Igor Korot
nk I posted it sounds like there is a byte sequence before the string, which identifies the encoding. Will this help? Thank you. > > -Ursprüngliche Nachricht- > Von: sqlite-users-boun...@mailinglists.sqlite.org > [mailto:sqlite-users-boun...@mailinglists.sqlite.org] Im Auf

Re: [sqlite] Conversion failure

2016-06-23 Thread Igor Korot
Hi, Ralf, On Thu, Jun 23, 2016 at 12:38 PM, Ralf Junker wrote: > If you are on Windows, you can use SQLiteSpy to correct such wrongly entered > ANSI text to Unicode throughout an entire database: It is not wrongly entered text. I am using Windows with English locale only. So

Re: [sqlite] Conversion failure

2016-06-23 Thread Igor Korot
Simon, On Thu, Jun 23, 2016 at 6:14 PM, Simon Slavin <slav...@bigfraud.org> wrote: > > On 23 Jun 2016, at 10:53pm, Igor Korot <ikoro...@gmail.com> wrote: > >> So what I'm trying to do is to see what will happen if I get a >> database with the German ch

Re: [sqlite] Conversion failure

2016-06-23 Thread Igor Korot
Kevin, On Thu, Jun 23, 2016 at 11:39 PM, Kevin Benson <kevin.m.ben...@gmail.com> wrote: > -- >-- > -- > --Ô¿Ô-- > K e V i N > > On Thu, Jun 23, 2016 at 10:38 AM, Igor Korot <ikoro...@gmail.com> wrote: > >> Hi, Clemens, >&

Re: [sqlite] Conversion failure

2016-06-23 Thread Igor Korot
Simon, On Thu, Jun 23, 2016 at 8:44 PM, Simon Slavin <slav...@bigfraud.org> wrote: > > On 23 Jun 2016, at 11:42pm, Igor Korot <ikoro...@gmail.com> wrote: > >> OK, so are they UTF-8, UTF-16 or something else? >> And I'm talking the default one - the one which is

Re: [sqlite] Conversion failure

2016-06-25 Thread Igor Korot
Simon, On Sat, Jun 25, 2016 at 8:18 PM, Simon Slavin <slav...@bigfraud.org> wrote: > > On 26 Jun 2016, at 1:14am, Igor Korot <ikoro...@gmail.com> wrote: > >> That would be 313, correct? > > Yes. The idea is to see if the bug still occurs in the current v

Re: [sqlite] Conversion failure

2016-06-25 Thread Igor Korot
Simon, On Sat, Jun 25, 2016 at 8:08 PM, Simon Slavin <slav...@bigfraud.org> wrote: > > On 25 Jun 2016, at 5:51am, Igor Korot <ikoro...@gmail.com> wrote: > >> This are the results of me trying: >> >> SQLite version 3.9.2 2015-11-02 18:31:45 >>

Re: [sqlite] Conversion failure

2016-06-25 Thread Igor Korot
On Sat, Jun 25, 2016 at 11:26 PM, Simon Slavin <slav...@bigfraud.org> wrote: > > On 26 Jun 2016, at 2:52am, Igor Korot <ikoro...@gmail.com> wrote: > >> Now we need to see the actual German version test result with old and >> new version of the shell tool.

[sqlite] SQLite policy on compile warnings

2016-06-25 Thread Igor Korot
Hi, ALL, I am wondering what is the current policy on the compilation warning for the SQLite? The reason being - I'm trying to incorporate SQLite into my software. The software will be cross-platform. On both Windows and Linux, I don't see any issues. However, trying to compile on Mac I have a

Re: [sqlite] SQLite policy on compile warnings

2016-06-25 Thread Igor Korot
Mr. Hipp, On Sat, Jun 25, 2016 at 11:31 PM, Richard Hipp <d...@sqlite.org> wrote: > On Sun, Jun 26, 2016 at 4:30 AM, Igor Korot <ikoro...@gmail.com> wrote: >> >> I am wondering what is the current policy on the compilation >> warning for the SQLite? >> >

Re: [sqlite] Conversion failure

2016-06-25 Thread Igor Korot
Simon, On Sat, Jun 25, 2016 at 8:32 PM, Simon Slavin <slav...@bigfraud.org> wrote: > > On 26 Jun 2016, at 1:29am, Igor Korot <ikoro...@gmail.com> wrote: > >> Now it would be interesting to know what is the result on German >> version of Windows with German >

Re: [sqlite] Conversion failure

2016-06-25 Thread Igor Korot
Simon, On Sat, Jun 25, 2016 at 9:11 PM, Igor Korot <ikoro...@gmail.com> wrote: > Simon, > > On Sat, Jun 25, 2016 at 8:32 PM, Simon Slavin <slav...@bigfraud.org> wrote: >> >> On 26 Jun 2016, at 1:29am, Igor Korot <ikoro...@gmail.com> wrote: >>

Re: [sqlite] SQLite policy on compile warnings

2016-06-25 Thread Igor Korot
Simon, On Sat, Jun 25, 2016 at 11:31 PM, Simon Slavin <slav...@bigfraud.org> wrote: > > On 26 Jun 2016, at 3:30am, Igor Korot <ikoro...@gmail.com> wrote: > >> ATM I'm using OSX 10.8 with Xcode 5.1.1. compiling everything for C++11 >> and libc++. > > You

Re: [sqlite] Conversion failure

2016-06-24 Thread Igor Korot
Scott, On Fri, Jun 24, 2016 at 2:16 PM, Scott Robison wrote: > On Fri, Jun 24, 2016 at 12:03 PM, Scott Robison > wrote: > >> On Windows, when you get a string of characters, you either get an ANSI >> string using some code page, or you get a

Re: [sqlite] Conversion failure

2016-06-25 Thread Igor Korot
Simon, On Sat, Jun 25, 2016 at 4:39 AM, Simon Slavin <slav...@bigfraud.org> wrote: > > On 25 Jun 2016, at 5:51am, Igor Korot <ikoro...@gmail.com> wrote: > >> So now the question is - what encoding is that value, so that it can >> be successfully converted to wstri

Re: [sqlite] Conversion failure

2016-06-25 Thread Igor Korot
ts.sqlite.org] On Behalf Of Simon Slavin >> Sent: Saturday, 25 June, 2016 02:40 >> To: SQLite mailing list >> Subject: Re: [sqlite] Conversion failure >> >> >> On 25 Jun 2016, at 5:51am, Igor Korot <ikoro...@gmail.com> wrote: >> >> > So no

Re: [sqlite] Conversion failure

2016-06-25 Thread Igor Korot
Keith, On Sat, Jun 25, 2016 at 10:14 AM, Keith Medcalf wrote: >> > And look in the registry under >> HKLM\CurrentControlSet\Control\NLS\CodePage > >> On my Windows 8.1 machine I don't have HK_LOCAL_MACHINE\CurrentControlSet. > > Ooops. My typo ... > > It is

Re: [sqlite] Compiling on Xcode

2016-07-14 Thread Igor Korot
On Thu, Jul 14, 2016 at 9:38 AM, Simon Slavin <slav...@bigfraud.org> wrote: > > On 14 Jul 2016, at 12:44pm, Igor Korot <ikoro...@gmail.com> wrote: > >> Is there anything else to check? > > No. Those look correct. You looked at the right place and it

Re: [sqlite] How to do PRAGMA in C-interface?

2016-07-14 Thread Igor Korot
Hi, On Thu, Jul 14, 2016 at 8:05 AM, Richard Hipp wrote: > On 7/14/16, wu tao wrote: >> I tried to do the sqlite db PRAGMA via c-interface, sqlite3_exec() with the >> following statements, >> >> PRAGMA main.cache_size=5000;PRAGMA main.page_size = 2048;PRAGMA

Re: [sqlite] Compiling on Xcode

2016-07-14 Thread Igor Korot
Simon, On Wed, Jul 13, 2016 at 11:51 PM, Simon Slavin <slav...@bigfraud.org> wrote: > > On 14 Jul 2016, at 4:43am, Igor Korot <ikoro...@gmail.com> wrote: > >> Right now my C Language option on the Xcode 5.1.1 is set to "GNU99". >> When using this opti

Re: [sqlite] Compiling on Xcode

2016-07-22 Thread Igor Korot
Simon, Sorry for the long delay. I was trying to catch up on some other stuff. On Thu, Jul 14, 2016 at 10:01 AM, Igor Korot <ikoro...@gmail.com> wrote: > On Thu, Jul 14, 2016 at 9:38 AM, Simon Slavin <slav...@bigfraud.org> wrote: >> >> On 14 Jul 2016, at 12:44pm, Igo

Re: [sqlite] AS being optional

2016-08-12 Thread Igor Korot
Dominick, On Fri, Aug 12, 2016 at 9:24 AM, Dominique Devienne wrote: > On Fri, Aug 12, 2016 at 2:42 PM, Keith Medcalf wrote: > >> [...] The main problem with the JOIN/ON syntax is that to a casual reading >> order is implied > > > No idea what you mean

Re: [sqlite] [Windows] 3.13.0 recreate db from .dump file corrupts records with extended characters

2016-07-13 Thread Igor Korot
Simon, As Mr Hipp pointed out - what problems you observed with SQLite? It is possible that if you report it it will be fixed and you won't need to do that restoration anymore. Thank you. On Wed, Jul 13, 2016 at 5:52 PM, S.Ajina wrote: >> What console font are you using,

Re: [sqlite] Menory leak/false positive

2016-07-13 Thread Igor Korot
Igor, On Wed, Jul 13, 2016 at 8:23 PM, Igor Tandetnik <i...@tandetnik.org> wrote: > On 7/13/2016 8:12 PM, Igor Korot wrote: >> >> char *z = sqlite3_mprintf( query2.c_str(), tableName >> ); > > > There is a bunch of calls to sqlite3_mprint

[sqlite] Menory leak/false positive

2016-07-13 Thread Igor Korot
Hi, ALL, I am trying to create my software with MSVC 2010 and latest SQLite. Because MSVC reported memory leaks, I tried VLD. Here is their output: [quote] Detected memory leaks! Dumping objects -> {158248} normal block at 0x011EA4B8, 48 bytes long. Data: 50 52 41 47 4D 41 20 66 6F 72 65 69 67

[sqlite] Compiling on Xcode

2016-07-13 Thread Igor Korot
Hi, ALL, Right now my C Language option on the Xcode 5.1.1 is set to "GNU99". When using this option I am getting a lot of different warnings like: Value Conversion Issue Implicit conversion loses integer precision. I know its just a warning, but I prefer the code to be compiled clean. I would

[sqlite] Database is locked

2016-07-09 Thread Igor Korot
Hi, Here is my situation. I'm trying to write some software in C{++}. Everything works fine except when I exit the program exit I get the error "Database is locked". I am only trying to retrieve the information about the database (queries on sqlite_master). So here are my questions: 1. When the

Re: [sqlite] Database is locked

2016-07-09 Thread Igor Korot
Simon, On Sat, Jul 9, 2016 at 7:09 PM, Simon Slavin <slav...@bigfraud.org> wrote: > > On 10 Jul 2016, at 12:06am, Igor Korot <ikoro...@gmail.com> wrote: > >> I'm trying to write some software in C{++}. Everything works fine except >> when I exit the progr

Re: [sqlite] Database is locked

2016-07-10 Thread Igor Korot
Dan, On Sun, Jul 10, 2016 at 11:57 AM, Dan Kennedy <danielk1...@gmail.com> wrote: > On 07/10/2016 06:21 AM, Igor Korot wrote: >> >> Simon, >> >> On Sat, Jul 9, 2016 at 7:09 PM, Simon Slavin <slav...@bigfraud.org> wrote: >>> >>> On 10 Ju

Re: [sqlite] newbie has waited days for a DB build to complete. what's up with this.

2016-08-05 Thread Igor Korot
Hi, Kevin, On Fri, Aug 5, 2016 at 3:18 PM, Kevin O'Gorman wrote: > Okay, I followed some of the advice y'all gave and got some results. > > 1. The original problem was compromised by malformed input. However, it > appears that did not cause the wedging of the process.

Re: [sqlite] Compiling on Xcode

2016-07-23 Thread Igor Korot
Simon et al, On Sat, Jul 23, 2016 at 2:20 AM, Simon Slavin <slav...@bigfraud.org> wrote: > > On 23 Jul 2016, at 4:26am, Igor Korot <ikoro...@gmail.com> wrote: > >> "Ambiguous expansion of macro MIN/MAX" > > Sorry, I don't recognise this problem. I would

Re: [sqlite] The upcoming "pi" release of SQLite

2016-07-23 Thread Igor Korot
Mr. Hipp, On Sat, Jul 23, 2016 at 11:16 AM, Richard Hipp wrote: > The next release of SQLite will be the "pi" release - version 3.14. > It will probably occur within the next two weeks. > > Draft change log: https://www.sqlite.org/draft/releaselog/3_14_0.html > > Code snapshot:

Re: [sqlite] How restrict access to SQLite database?

2016-08-09 Thread Igor Korot
Hi, On Tue, Aug 9, 2016 at 9:25 AM, Jaime Stuardo wrote: > Hello, > > > > I am developing an application that should use a database. System is very > simple that I will try with a file based database system, however, I have > found a subject that is very critical for

Re: [sqlite] SQLite policy on compile warnings

2016-06-30 Thread Igor Korot
Simon, On Sun, Jun 26, 2016 at 12:16 AM, Igor Korot <ikoro...@gmail.com> wrote: > Simon, > > On Sat, Jun 25, 2016 at 11:31 PM, Simon Slavin <slav...@bigfraud.org> wrote: >> >> On 26 Jun 2016, at 3:30am, Igor Korot <ikoro...@gmail.com> wrote: >>

[sqlite] FOREIGN KEY question

2017-02-07 Thread Igor Korot
Hi, ALL, Does SQLite supports the FK name? If yes, what is the proper syntax? Thank you. ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Error handling

2017-02-15 Thread Igor Korot
Hi, Richard, On Wed, Feb 15, 2017 at 8:20 PM, Richard Hipp <d...@sqlite.org> wrote: > On 2/15/17, Igor Korot <ikoro...@gmail.com> wrote: >> >> Well, my question here is a bit different - if sqlite3_step () returns an >> error >> should the statement be re

Re: [sqlite] Error handling

2017-02-15 Thread Igor Korot
Hi, Igor, On Feb 15, 2017 7:16 PM, "Igor Tandetnik" <i...@tandetnik.org> wrote: On 2/15/2017 7:02 PM, Igor Korot wrote: > My question is: how many calls to "sqlite3_finalize() should be there? > For every successful call to sqlite3_prepare[_v2], there

[sqlite] Error handling

2017-02-15 Thread Igor Korot
Hi, ALL, Consider the following pseudo-code: [code] int ret = sqlite3_prepare_v2(); if( ret != SQLITE_OK ) { // henerate error message return 1; } while( ; ; ) { ret = sqlite3_step(); if( ret == SQLITE_ROW ) { // everything is good } else if( ret == SQLITE_DONE )

[sqlite] Executing multiple statements at once

2017-01-19 Thread Igor Korot
Hi, ALL, Is it possible to write something like this: sqlite3_prepare_v2( m_db, "BEGIN TRANSACTION; CREATE TEMP TABLE temp AS SELECT * FROM mytable; DROP TABLE mytable; CREATE TABLE mytable(id INTEGER PRIMARY KEY, name TEXT PRIMARY KEY, salary INTEGER); INSERT INTO mytable SELECT * FROM temp;

Re: [sqlite] Query time execution difference between my application and SQLiteBrowser

2016-09-08 Thread Igor Korot
Laura, On Thu, Sep 8, 2016 at 5:22 AM, Laura BERGOENS wrote: > Hi everyone, > > So I've put indexes myself on the most used tables in my program, then > ANALYZE the db, and now it flies. > The automatic creation of index probably took a lot of time, and it affects >

Re: [sqlite] Query time execution difference between my application and SQLiteBrowser

2016-09-07 Thread Igor Korot
Hi, Laura, On Wed, Sep 7, 2016 at 10:48 AM, Laura BERGOENS wrote: > Note : I had some real queries that use to take 100 seconds to execute, and > I optimized them myself. > It looks like this : > > I have 4 tables: tableA, tableLink, tableC and tableD > tableA, Link

Re: [sqlite] REQUETES

2016-08-31 Thread Igor Korot
Hi, On Wed, Aug 31, 2016 at 9:14 AM, REGIANY Lucie wrote: > > HELLO > I WOULD DO SELECT FROM MY TABLE > select * > FROM "_L93_ZONAGES_exportdirectory_list" > WHERE "_L93_ZONAGES_exportdirectory_list".'TYPE' LIKE 'TAB%' > OR > "_L93_ZONAGES_exportdirectory_list".'TYPE'

Re: [sqlite] Query time execution difference between my application and SQLiteBrowser

2016-09-07 Thread Igor Korot
Hi, Laura, On Wed, Sep 7, 2016 at 12:25 PM, Laura BERGOENS wrote: > Hi Dominique, > > I guess it's not, but I'm not quite sure on what I can share, I'm a newbie > in a professional environment. I would be more confortable if I ask my boss > first. In the meantime, all

Re: [sqlite] bug in sqlite when

2016-08-24 Thread Igor Korot
Hi, Sergey, On Wed, Aug 24, 2016 at 8:55 AM, Sergey Shamshyn wrote: > Hi. > I have a big trouble using SQLite: got an error SQLITE_CORRUPT (11), I think > this is a 100% SQLite bug, because: > - only ONE THREAD of my process is writing periodically to db file > - onlt

Re: [sqlite] CREATE TABLE fails

2016-11-22 Thread Igor Korot
Hi, guys, Parents with the comma before "PRIMARY" fixed it. Thx. On Tue, Nov 22, 2016 at 9:39 AM, Niall O'Reilly wrote: > On 22 Nov 2016, at 14:35, David Raymond wrote: > >> It's needed. The arrow coming out of [column-def] (visually) goes past >> [table-constraint]

Re: [sqlite] creating a table

2016-11-21 Thread Igor Korot
Hi, John, On Mon, Nov 21, 2016 at 12:29 PM, John R. Sowden wrote: > First of all, I come from the dBASE/Foxpro world. There is no distinction > between a table and a database. I understand that with Sqlite a database > includes tables and other items. The scenario

[sqlite] CREATE TABLE fails

2016-11-22 Thread Igor Korot
Hi, ALL, SQLite version 3.13.0 2016-05-18 10:57:30 Enter ".help" for usage hints. Connected to a transient in-memory database. Use ".open FILENAME" to reopen on a persistent database. sqlite> CREATE TABLE IF NOT EXISTS abc("abc_tnam" char(129) NOT NULL, "abc_tid" integer, "abc_ownr" char(129) NOT

Re: [sqlite] creating a table

2016-11-21 Thread Igor Korot
Hi, Niall, On Mon, Nov 21, 2016 at 12:52 PM, Niall O'Reilly wrote: > On 21 Nov 2016, at 17:29, John R. Sowden wrote: > >> First of all, I come from the dBASE/Foxpro world. There is no distinction >> between a table and a database. I understand that with Sqlite a database

Re: [sqlite] creating a table

2016-11-22 Thread Igor Korot
John, On Tue, Nov 22, 2016 at 11:00 AM, John R. Sowden wrote: > That was a throw back to years ago. I was trying to protect against y2k by > making each dbf for 1 calendar year. Also, these files are about 800k in > size, so I was worried about storage and search

[sqlite] Export database into mySQL

2016-11-28 Thread Igor Korot
Hi, Is it possible to load the SQLite schema from the .dump command into mySQL? Or I will have to do that on per-table? Thank you. ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org

[sqlite] Bug in the docs

2016-11-19 Thread Igor Korot
Hi, ALL, On the page https://www.sqlite.org/c3ref/exec.html following phrase is written: [quote] If the 5th parameter to sqlite3_exec() is not NULL then any error message is written into memory obtained from sqlite3_malloc() and passed back through the 5th parameter. [/quote] Shouldn't it start

[sqlite] Fwd: Bug in the docs

2016-11-19 Thread Igor Korot
Hi, ALL, On the page https://www.sqlite.org/c3ref/exec.html following phrase is written: [quote] If the 5th parameter to sqlite3_exec() is not NULL then any error message is written into memory obtained from sqlite3_malloc() and passed back through the 5th parameter. [/quote] Shouldn't it start

[sqlite] Backward cursor support?

2016-10-11 Thread Igor Korot
Hi, Does SQLite support backward cursor? Something like step_back()? If not, what would be a way to do it? Thank you. ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org

Re: [sqlite] Backward cursor support?

2016-10-12 Thread Igor Korot
qlite.org/draft/rowvalue.html > http://use-the-index-luke.com/blog/2014-05/what-i-learned-about-sqlite-at-a-postgresql-conference > > >> -Original Message- >> From: sqlite-users [mailto:sqlite-users-boun...@mailinglists.sqlite.org] >> On Behalf Of Igor Koro

[sqlite] How do I check if the DB is open?

2016-12-13 Thread Igor Korot
Hi, ALL, I'm using following code to check for errors in debug mode: int res = sqlite3_close( m_db ); if( res != SQLITE_OK ) { // error handling } #ifdef DEBUG sqlite3_stmt *statement = sqlite3_next_stmt( m_db, NULL ); if( statement ) const char *query =

Re: [sqlite] How do I check if the DB is open?

2016-12-13 Thread Igor Korot
Simon, On Tue, Dec 13, 2016 at 8:33 PM, Simon Slavin <slav...@bigfraud.org> wrote: > > On 14 Dec 2016, at 1:20am, Igor Korot <ikoro...@gmail.com> wrote: > >> So are you saying that this code should be executed if sqlite3_close() >> didn't return SQLITE_OK? &

Re: [sqlite] How do I check if the DB is open?

2016-12-13 Thread Igor Korot
>> -Original Message- >> From: sqlite-users [mailto:sqlite-users-boun...@mailinglists.sqlite.org] >> On Behalf Of Igor Korot >> Sent: Tuesday, 13 December, 2016 17:55 >> To: Discussion of SQLite Database; General Discussion of SQLite Database >> Subjec

Re: [sqlite] How do I check if the DB is open?

2016-12-13 Thread Igor Korot
e you saying that this code should be executed if sqlite3_close() didn't return SQLITE_OK? Thank you. > > -Nathan > > On Tue, Dec 13, 2016 at 07:54:34PM -0500, Igor Korot wrote: >> Hi, ALL, >> I'm using following code to check for errors in debug mode: >> >>

Re: [sqlite] How do I check if the DB is open?

2016-12-13 Thread Igor Korot
Nathan, On Tue, Dec 13, 2016 at 8:36 PM, Nathan Bossett <nboss...@pierb.com> wrote: > On Tue, Dec 13, 2016 at 08:20:44PM -0500, Igor Korot wrote: >> > What more are you trying to find out? >> >> If I forget to finalize statement, I can use that sequence to f

Re: [sqlite] How do I check if the DB is open?

2016-12-13 Thread Igor Korot
Jens, On Tue, Dec 13, 2016 at 8:38 PM, Jens Alfke wrote: > >> On Dec 13, 2016, at 5:33 PM, Simon Slavin wrote: >> >> The only thing you should do if sqlite3_close() doesn’t work is to print an >> error message which includes the value returned.

Re: [sqlite] Weird issue with the query

2016-12-02 Thread Igor Korot
Simon, On Fri, Dec 2, 2016 at 9:47 PM, Simon Slavin <slav...@bigfraud.org> wrote: > > On 3 Dec 2016, at 2:44am, Igor Korot <ikoro...@gmail.com> wrote: > >> Ok so in order to fix it I should assign the result of conversion to some >> variable? > > It m

[sqlite] Weird issue with the query

2016-12-02 Thread Igor Korot
Hi, ALL, I wrote following code in C++ (error checking removed for clarity): [code] const std::wstring ::GetTableComments(const std::wstring , std::vector ) { std::wstring comment = L""; sqlite3_stmt *stmt = NULL; std::wstring errorMessage; std::wstring query = L"SELECT

<    1   2   3   4   5   >