Re: [sqlite] SQL newbie, how to implement a delete correctly.

2014-12-30 Thread Igor Korot
Simon, On Tue, Dec 30, 2014 at 1:41 PM, Simon Slavin wrote: > On 30 Dec 2014, at 6:19pm, Jonathan Leslie wrote: > >> C:\jon>cat t2.lis | gawk "/.*/ { print \"delete from \" $3 \" where \" $4 }" >> |cut -d"," -f1delete from "parent01" where

Re: [sqlite] VACUUM requires 6.7 times space ?

2015-01-05 Thread Igor Korot
Hi, Simon, On Mon, Jan 5, 2015 at 6:32 AM, Dan Kennedy wrote: > On 01/05/2015 06:22 PM, Simon Slavin wrote: >> >> I have a database file which is 120GB in size. It consists of two huge >> tables and an index. >> Its journal_mode is DELETE. >> >> It is on a partition with

[sqlite] Typo in the docs

2016-05-26 Thread Igor Korot
Hi, Page https://www.sqlite.org/see/doc/trunk/www/readme.wiki [quote] Do decrypt a database do this: .rekey old-key "" [/quote] I think it should be "To decrypt..." Thank you. ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org

[sqlite] Windows 8.x security requirements / SafeSEHCheck - NXCheck - DBCheck

2015-04-02 Thread Igor Korot
HI, If I may... On Thu, Apr 2, 2015 at 4:25 PM, Richard Hipp wrote: > On 4/2/15, Random Coder wrote: >> >> I'd recommend the SQLite team turn them on for the version of the DLL >> they distribute, but I'm honestly not sure if there are negative side >> effects to doing so. > > That's not

[sqlite] SQLite to SQL Server

2015-04-14 Thread Igor Korot
Hi, On Tue, Apr 14, 2015 at 10:31 AM, Drago, William @ CSG - NARDA-MITEQ wrote: > Thanks for the tip. I've used dump before to move data around between SQLite > databases. I should have realized that I could have used it to move data to > SQL Server. And you can use bcp (freebcp from freeTDS

[sqlite] How is the name of the db file is identified?

2015-12-27 Thread Igor Korot
Hi, ALL, Is it possible to save the SQLite DB file whose name contains some Unicode characters? Have such a character in the table name? Thank you.

[sqlite] Fwd: Happy New Year

2015-12-31 Thread Igor Korot
-- Forwarded message -- From: Igor Korot <ikoro...@gmail.com> Date: Thu, Dec 31, 2015 at 5:06 PM Subject: Happy New Year To: "python-list at python.org" , General Discussion of SQLite Database Happy New Year to everybody on those lists. Let this year

[sqlite] Could frequent 'database is locked' errors mean SQLite is not a good fit for my application?

2015-07-02 Thread Igor Korot
Hi, Kathleen, On Thu, Jul 2, 2015 at 5:34 PM, James K. Lowden wrote: > On Thu, 2 Jul 2015 10:09:12 -0400 > Kathleen Alexander wrote: > >> Essentially, I have written an application in C++ that interfaces >> (reads and writes) with a SQLite database, and I am getting lots of >> 'database is

[sqlite] implicit vs explicit joins

2015-06-11 Thread Igor Korot
Clemens, On Thu, Jun 11, 2015 at 7:01 AM, Clemens Ladisch wrote: > Paul Sanderson wrote: >> I have just been asked whether implicit and explicit join are the same >> >> select text, handle.id from message,handle where handle_id = handle.ROWID; > > This is an implicit *inner* join. > >> SELECT

[sqlite] Fault on transaction begin, end, and rollback statements

2015-06-25 Thread Igor Korot
Hi, Che, On Thu, Jun 25, 2015 at 12:41 PM, Ch? wrote: > After using sqlite3_prepare_v2 to prepare "BEGIN TRANSACTION", "END > TRANSACTION", and "ROLLBACK TRANSACTION", the system will fault at a delayed > time when calling sqlite3_step. If I call prepare and step right away, there > is no

[sqlite] Fault on transaction begin, end, and rollback statements

2015-06-25 Thread Igor Korot
Che, On Thu, Jun 25, 2015 at 5:38 PM, Kees Nuyt wrote: > On Thu, 25 Jun 2015 16:41:25 + (UTC), Ch? > wrote: > >>After using sqlite3_prepare_v2 to prepare "BEGIN TRANSACTION", "END >>TRANSACTION", and "ROLLBACK TRANSACTION", the system will fault at a delayed >>time when calling

[sqlite] Fwd: Is there an ODBC driver for SQLite

2015-05-01 Thread Igor Korot
Hi, ALL, Is there an ODBC driver for SQLite DB? I'm trying to see if it will be possible to have an application written in dBase + Paradox to be converted to dBase + SQLite. So, if there is such a driver I would be very interested in requesting it and evaluate it. Also it would be nice to

[sqlite] index broken by insert

2015-05-19 Thread Igor Korot
Hi, Roman, On Tue, May 19, 2015 at 1:23 PM, Roman Fleysher wrote: > "Confirmation" of a bug: > > When I use old SQLite version 3.7.2, the offending INSERT does NOT lead to > integrity failure. This is indicative of either bug in old integrity check or > new insert. Please let me know what

[sqlite] Adding the source to XCode

2013-10-22 Thread Igor Korot
Hi, ALL, I'm trying to build my C++ project which involves SQLite on MAC. I have Snow Leopard (OS X 10.6.8) along with XCode 4.2. I successfully made a project in XCode, then moved my cpp files in it. Now I am trying to add the "sqlite3.c" but I couldn't. Going to "File"->"Add Files to,,," I see

Re: [sqlite] Adding the source to XCode

2013-10-22 Thread Igor Korot
Hi, Simon,, On Tue, Oct 22, 2013 at 2:29 AM, Simon Slavin <slav...@bigfraud.org> wrote: > > On 22 Oct 2013, at 9:17am, Igor Korot <ikoro...@gmail.com> wrote: > > > Now I am trying to add the "sqlite3.c" but I couldn't. > > Going to "File"-&g

Re: [sqlite] Adding the source to XCode

2013-10-22 Thread Igor Korot
Simon, First of, thank you for all those links and explanation. Very much appreciated. Now, more below. On Tue, Oct 22, 2013 at 3:48 PM, Simon Slavin <slav...@bigfraud.org> wrote: > > On 22 Oct 2013, at 7:37pm, Igor Korot <ikoro...@gmail.com> wrote: > > > On Tue, Oct

[sqlite] Is this a proper syntax?

2013-10-24 Thread Igor Korot
Hi, ALL, Will this query work: UPDATE a SET a.field1 = (SELECT b.field1 FROM b AS myfield), a.field2 = myfield... or I will have to repeat subquery for a.field2? Thank you. ___ sqlite-users mailing list sqlite-users@sqlite.org

Re: [sqlite] Is this a proper syntax?

2013-10-24 Thread Igor Korot
Igor, On Thu, Oct 24, 2013 at 12:57 PM, Igor Tandetnik <i...@tandetnik.org> wrote: > On 10/24/2013 3:23 PM, Igor Korot wrote: > >> Will this query work: >> >> UPDATE a SET a.field1 = (SELECT b.field1 FROM b AS myfield), a.field2 = >> myfield... >

Re: [sqlite] Is this a proper syntax?

2013-10-24 Thread Igor Korot
Thank you. That worked. On Thu, Oct 24, 2013 at 5:00 PM, Igor Tandetnik <i...@tandetnik.org> wrote: > On 10/24/2013 7:34 PM, Igor Korot wrote: > >> So I was thinking of something like this: >> >> UPDATE leagueplayers SET original_rank = (SELECT rank FROM players A

[sqlite] Is there a function that return an autoimcremented value?

2013-10-24 Thread Igor Korot
Hi, ALL, Consider the following schema: CREATE TABLE players( playerid INTEGER PRIMARY KEY, name TEXT, rank INTEGER); CREATE TABLE leagueplayers( playerid INTEGER, leagueid INTEGER, current_rank INTEGER original_rank INTEGER); The fields rank, current_rank and original_rank are recent addition

Re: [sqlite] Adding the source to XCode

2013-10-24 Thread Igor Korot
Hi, Simon, On Tue, Oct 22, 2013 at 4:53 PM, Simon Slavin <slav...@bigfraud.org> wrote: > > On 23 Oct 2013, at 12:13am, Igor Korot <ikoro...@gmail.com> wrote: > > > Now one last question hopefully. Where XCode will store the db file > inside > > t

Re: [sqlite] Is this a proper syntax?

2013-10-25 Thread Igor Korot
t; -----Ursprüngliche Nachricht- > Von: Igor Korot [mailto:ikoro...@gmail.com] > Gesendet: Freitag, 25. Oktober 2013 01:35 > An: General Discussion of SQLite Database > Betreff: Re: [sqlite] Is this a proper syntax? > > Igor, > > > On Thu, Oct 24, 2013 at 12:57 PM, Igo

Re: [sqlite] Is there a function that return an autoimcremented value?

2013-10-25 Thread Igor Korot
Hi, Clemens, On Fri, Oct 25, 2013 at 2:12 AM, Clemens Ladisch <clem...@ladisch.de> wrote: > Igor Korot wrote: > > what I'm looking for is a way to populate the current_rank and > > original_rank in the leagueplayers table. They should come up as > > auto-incremented v

Re: [sqlite] Is there a function that return an autoimcremented value?

2013-10-25 Thread Igor Korot
Hi, guys, On Fri, Oct 25, 2013 at 6:19 AM, Igor Tandetnik <i...@tandetnik.org> wrote: > On 10/24/2013 10:48 PM, Igor Korot wrote: > >> INSERT INTO leagueplayers SELECT players.playerid, %d, ... ORDER BY >> players.rank; >> >> Now my language of choice is C

Re: [sqlite] Is there a function that return an autoimcremented value?

2013-10-25 Thread Igor Korot
Igor, On Fri, Oct 25, 2013 at 3:26 PM, Igor Tandetnik <i...@tandetnik.org> wrote: > On 10/25/2013 5:53 PM, Igor Korot wrote: > >> If I do something like this: >> >> CREATE TRIGGER AFTER INSERT >> { >> SELECT max( current_rank ) AS a FROM leagueplayers W

[sqlite] Trigger slows down application start-up

2013-10-30 Thread Igor Korot
Hi, ALL, I am developing my application on Windows using MSVC 2010 32-bit and test on Win 7 64-bit. Recently I had to create a trigger (actually 2 triggers to populate data in 2 tables). After those triggers had been created the application start-up time significantly increased (debug version

Re: [sqlite] Trigger slows down application start-up

2013-10-30 Thread Igor Korot
On Wed, Oct 30, 2013 at 12:36 AM, Clemens Ladisch <clem...@ladisch.de> wrote: > Igor Korot wrote: >> After those triggers had been created the application start-up time >> significantly increased. >> >> On start-up it opens connection to the database and quer

Re: [sqlite] Trigger slows down application start-up

2013-10-30 Thread Igor Korot
Hi, Clemens et al, On Wed, Oct 30, 2013 at 1:11 AM, Igor Korot <ikoro...@gmail.com> wrote: > Clemens, > > On Wed, Oct 30, 2013 at 12:47 AM, Igor Korot <ikoro...@gmail.com> wrote: >> On Wed, Oct 30, 2013 at 12:36 AM, Clemens Ladisch <clem...@ladisch.de> wrote:

Re: [sqlite] Trigger slows down application start-up

2013-10-31 Thread Igor Korot
Dan, On Thu, Oct 31, 2013 at 1:45 AM, Dan Kennedy <danielk1...@gmail.com> wrote: > On 10/31/2013 06:20 AM, Igor Korot wrote: >> >> Hi, Clemens et al, >> >> On Wed, Oct 30, 2013 at 1:11 AM, Igor Korot <ikoro...@gmail.com> wrote: >>> >>> Clem

[sqlite] TRIGGER syntax

2013-10-31 Thread Igor Korot
Hi, ALL, In the CREATE TRIGGER can I use something like this: CREATE TRIGGER foo AFTER INSERT BEGIN IF foo.field1 IS NULL UPDATE foo SET field1 = ; ELSE UPDATE foo SET field1 = field1 + 1 WHERE field1 > new.; END; My concern is if CREATE TRIGER will understand

Re: [sqlite] TRIGGER syntax

2013-10-31 Thread Igor Korot
Igor, On Thu, Oct 31, 2013 at 5:33 PM, Igor Tandetnik <i...@tandetnik.org> wrote: > On 10/31/2013 8:22 PM, Igor Korot wrote: >> >> Hi, ALL, >> In the CREATE TRIGGER can I use something like this: >> >> CREATE TRIGGER foo AFTER INSERT >> BEGIN >>

Re: [sqlite] TRIGGER syntax

2013-10-31 Thread Igor Korot
Simon, On Thu, Oct 31, 2013 at 8:51 PM, Simon Slavin <slav...@bigfraud.org> wrote: > > On 1 Nov 2013, at 2:15am, Igor Korot <ikoro...@gmail.com> wrote: > >> When the record is inserted with the field1 as NULL, I want to have >> the field1 to have value max(

Re: [sqlite] TRIGGER syntax

2013-10-31 Thread Igor Korot
Simon, On Thu, Oct 31, 2013 at 9:39 PM, Simon Slavin <slav...@bigfraud.org> wrote: > > On 1 Nov 2013, at 4:15am, Igor Korot <ikoro...@gmail.com> wrote: > >> I'm not trying to change an order of my rows. >> Look at it this way: >> I have a league with

Re: [sqlite] What is wrong with this trigger?

2013-11-10 Thread Igor Korot
I just tried to do: SELECT max(current_rank) FROM playersinleague WHERE id = 1; and I got an empty string and not 0. Is this a bug? Should max(field) return 0 if there is no records that satisfy criteria? Thank you. On Sat, Nov 9, 2013 at 9:54 PM, Igor Korot <ikoro...@gmail.com> wrote

Re: [sqlite] What is wrong with this trigger?

2013-11-10 Thread Igor Korot
Simon et al, On Sun, Nov 10, 2013 at 7:18 AM, Simon Slavin wrote: > > On 10 Nov 2013, at 3:05pm, Igor Tandetnik wrote: > >> That rather depends on what value you deem to be the correct one. You've >> never explained the desired outcome of all this

Re: [sqlite] What is wrong with this trigger?

2013-11-10 Thread Igor Korot
Simon, On Sun, Nov 10, 2013 at 8:44 AM, Simon Slavin <slav...@bigfraud.org> wrote: > > On 10 Nov 2013, at 4:26pm, Igor Korot <ikoro...@gmail.com> wrote: > >> I'm updating the table when the program exit. > > There is not need to update the table. In fact the

[sqlite] How to cancel the operation?

2013-11-11 Thread Igor Korot
Hi, ALL, I downloaded and installed the command line SQLite3 tool on my Windows box. What I don't understand now is to how to cancel the long operation. Suppose I need to do this: sqlite3> CREATE TRIGGER > mytabe_insert AFTER INSERT ON > now at this point I need to cancel the

[sqlite] If prepare failed do I have to call finalize?

2013-11-12 Thread Igor Korot
Hi, ALL, Consider this: std::string query = ""; if( ( result = sqlite3_prepare_v2( handle, query, -1 , 0 ) ) != SQLITE_OK ) { // Should there be call to sqlite3_finalize. I.e. can I safely assume that since it failed all memory is not being allocated } Thank you.

Re: [sqlite] If prepare failed do I have to call finalize?

2013-11-12 Thread Igor Korot
OK, so it's not required. Thank you. On Tue, Nov 12, 2013 at 3:33 AM, Igor Tandetnik wrote: > On 11/12/2013 5:11 AM, Stephan Beal wrote: >> >> A related point which bit me once: if the input SQL is empty, the >> statement >> will be NULL as well but 0 will be returned. > > >

[sqlite] What is the best index to create?

2013-11-12 Thread Igor Korot
Hi, ALL, sqlite> EXPLAIN QUERY PLAN SELECT DISTINCT playersinleague.playerid, leaguescore hitter.scoreid, leaguescorehitter.value, leaguescorepitcher.scoreid, leaguescore pitcher.value FROM playersinleague, leaguescorehitter, leaguescorepitcher WHERE playersinleague.id = 1 AND

Re: [sqlite] What is the best index to create?

2013-11-12 Thread Igor Korot
Hi, Simon, On Tue, Nov 12, 2013 at 2:18 PM, Simon Slavin <slav...@bigfraud.org> wrote: > > On 12 Nov 2013, at 9:41pm, Igor Korot <ikoro...@gmail.com> wrote: > >> I don't see what is wrong. It should be using foreign key constraints >> on the last two se

Re: [sqlite] What is the best index to create?

2013-11-13 Thread Igor Korot
Anyone? I need to understand which index to create and how to fix the query. Thank you. On Tue, Nov 12, 2013 at 6:17 PM, Igor Korot <ikoro...@gmail.com> wrote: > Hi, Simon, > > On Tue, Nov 12, 2013 at 2:18 PM, Simon Slavin <slav...@bigfraud.org> wrote: >> >>

[sqlite] Can I use primary key field as a foreign key?

2013-11-13 Thread Igor Korot
Hi, ALL, Can I use the same field as both primary key and foreign key? Thank you. ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Can I use primary key field as a foreign key?

2013-11-13 Thread Igor Korot
Simon, On Wed, Nov 13, 2013 at 5:53 PM, Simon Slavin <slav...@bigfraud.org> wrote: > > On 14 Nov 2013, at 12:53am, Igor Korot <ikoro...@gmail.com> wrote: > >> Can I use the same field as both primary key and foreign key? > > Yes. Good idea, in fact. Is it docum

[sqlite] Foreign key vs index (continue)

2013-11-13 Thread Igor Korot
Hi, ALL, Now that the loop in the query is fixed I want to come back to this topic. Here is modified query plan: sqlite> EXPLAIN QUERY PLAN SELECT playersinleague.playerid,scorehits.scorename,l eaguescorehitter.value FROM playersinleague,scorehits,leaguescorehitter WHERE sc orehits.scoreid =

Re: [sqlite] Foreign key vs index (continue)

2013-11-13 Thread Igor Korot
Igor, On Wed, Nov 13, 2013 at 7:34 PM, Igor Tandetnik <i...@tandetnik.org> wrote: > On 11/13/2013 10:13 PM, Igor Korot wrote: >> >> What I don't understand is: >> >> All fields in WHERE clause are declared as primary/foreign keys. And >> it still gives

[sqlite] 2 more questions

2013-11-19 Thread Igor Korot
d. What is best practice here? Should I use "ORDER BY" or leave my code as it is? 2. sqlite> EXPLAIN QUERY PLAN SELECT players.playerid FROM players WHERE players.na me = "Igor Korot" AND players.age = 25 AND players.teamid = (SELECT teamid FROM teams WHERE teams.name = "

[sqlite] Nested transactions

2013-11-23 Thread Igor Korot
If I understand correctly, I can do this (pseudo-code): BEGIN TRANSACTION; // some SQL statements BEGIN TRANSACTION; // some more SQL statements IF (more SQL statements == SUCCESS ) COMMIT; END / no need to ROLLBACK here, it will be done in the outer transaction IF( SQL statements ==

[sqlite] What this function returns?

2013-11-29 Thread Igor Korot
Hi, ALL, One stupid question: what sqlite3_last_insert_rowid() function returns? I have the following code: int MyClass::Foo() { return sqlite3_last_insert_rowid( m_handle ); } It compiles fine on Windows (7 64 bit) with MSVC 2010 SP1 Pro 32-bit project. But on Snow Leopard XCode 4.2

Re: [sqlite] What this function returns?

2013-11-29 Thread Igor Korot
Drake, On Fri, Nov 29, 2013 at 7:04 PM, Drake Wilson <dr...@dasyatidae.net> wrote: > Quoth Igor Korot <ikoro...@gmail.com>, on 2013-11-29 18:49:05 -0800: >> Trying to change the return type to long does not solve the warning. >> >> Which value should this functio

Re: [sqlite] What this function returns?

2013-11-29 Thread Igor Korot
Simon, On Fri, Nov 29, 2013 at 7:33 PM, Simon Slavin <slav...@bigfraud.org> wrote: > > On 30 Nov 2013, at 3:28am, Igor Korot <ikoro...@gmail.com> wrote: > >> Also I am compiling 32-bit app on both platforms. > > Do you absolutely need to compile 32-bit for

[sqlite] Is this a proper call?

2013-11-30 Thread Igor Korot
Hi, ALL, Is this a proper call to execute: if( sqlite3_exec( m_handle, "PRAGMA foreign_keys = OFF", NULL, NULL, 0 ) != SQLITE_OK ) { // displaying error message } The problem is that after successful execution of such code, I am still getting error: "foreign key constraint failed" when

Re: [sqlite] Is this a proper call?

2013-12-01 Thread Igor Korot
Clemens, Thank you for clearing that up. On Sun, Dec 1, 2013 at 8:55 AM, Clemens Ladisch <clem...@ladisch.de> wrote: > Igor Korot wrote: >> Is this a proper call to execute: >> >> if( sqlite3_exec( m_handle, "PRAGMA foreign_keys = OFF", NULL, NULL, 0 ) != >

[sqlite] 32-bit vs 64-bit build

2013-12-13 Thread Igor Korot
Hi, ALL, I'm building a software that should work on Windows XP+ and Mac. As far as I know Windows XP is 32-bit only system. I'm building the software on Windows 7 (64-bit) using MSVC 2010 32-bit project. In order to retrieve the key of the tables I received a suggestion to use sqlite3_int64

Re: [sqlite] 32-bit vs 64-bit build

2013-12-13 Thread Igor Korot
Keith, On Fri, Dec 13, 2013 at 7:52 PM, Keith Medcalf wrote: > >>In order to retrieve the key of the tables I received a suggestion to >>use sqlite3_int64 type which should handle big numbers. > >>My question is: Will it work correctly on Windows XP which is 32-bit OS? > >

[sqlite] Web application with SQLite

2013-12-27 Thread Igor Korot
Hi ALL, Does people use SQLite for Web development? Or web apps are written only with mySQL/MS SQL? What are pros/cons of usinf SQLite for Web app? Thank you. ___ sqlite-users mailing list sqlite-users@sqlite.org

[sqlite] How to write a query

2014-03-05 Thread Igor Korot
Hi, ALL, Let's say I have a table with following data: field1field2field3 field4 12 3 4 5 6 7 8 How do I write a query which will produce the output as: 1 2 5 6 3 4 7 8 Is it possible to write a single query which will produce

Re: [sqlite] How to write a query

2014-03-05 Thread Igor Korot
Hi, Simon, On Wed, Mar 5, 2014 at 2:21 AM, Simon Davies <simon.james.dav...@gmail.com>wrote: > On 5 March 2014 10:04, Igor Korot <ikoro...@gmail.com> wrote: > > Hi, ALL, > > Let's say I have a table with following data: > > > > field1field2field3

Re: [sqlite] Android sqlite error

2014-06-13 Thread Igor Korot
Hi, Satnish, On Fri, Jun 13, 2014 at 12:01 AM, Sathish N wrote: > hi, > > Thanks for the reply. > what do you mean that i cant write at dest. i am not sure what it means. It means you are trying to execute an INSERT/UPDATE statement which fails. It's quite obvious. Thank

Re: [sqlite] Android sqlite error

2014-06-13 Thread Igor Korot
Hi, On Fri, Jun 13, 2014 at 12:24 AM, Sathish N <nsathis...@gmail.com> wrote: > hi Igor Korot, > > yes it is happening, every time i update the database. because of this the > application is getting crashed. > > Can you please help me with the solution. As this is t

[sqlite] Why am I getting an error?

2015-11-14 Thread Igor Korot
Hi, ALL, I am trying to use following query: "PRAGMA table_info(?)" with the sqlite3_prepare_v2()/sqlite3_bind()/sqlite3_step() sequence. However the call to sqlite3_prepare_v2() fails with the SQLITE_ERROR or the value of 1. The following call to sqlite3_ermsg() says "near "?": syntax error".

[sqlite] Why am I getting an error?

2015-11-14 Thread Igor Korot
Hi, Richard, On Sat, Nov 14, 2015 at 6:54 PM, Richard Hipp wrote: > On 11/14/15, Igor Korot wrote: >> Hi, ALL, >> I am trying to use following query: >> >> "PRAGMA table_info(?)" > > The argument to a pragma is not an expression, and hence i

[sqlite] Why am I getting an error?

2015-11-15 Thread Igor Korot
Richard, On Sat, Nov 14, 2015 at 7:13 PM, Richard Hipp wrote: > On 11/14/15, Igor Korot wrote: >> Hi, Richard, >> >> On Sat, Nov 14, 2015 at 6:54 PM, Richard Hipp wrote: >>> On 11/14/15, Igor Korot wrote: >>>> Hi, ALL, >>>> I am tryin

[sqlite] Retrieving the table info fails

2015-11-16 Thread Igor Korot
Hi, ALL, I was successfully able to use Mr. Hipp' suggestion: char *z = sqlite3_mprintf("PRAGMA table_info(\"%w\");", zTableName); The prepare and step z. Then: sqlite3_free(z); However, for some reason, I'm getting crash. Here is the relevant code: fieldName = reinterpret_cast(

[sqlite] Retrieving the table info fails

2015-11-16 Thread Igor Korot
Igor, On Mon, Nov 16, 2015 at 12:42 PM, Igor Tandetnik wrote: > On 11/16/2015 12:11 PM, Igor Korot wrote: >> >> The crash occurs when the program tries to retrieve the value for >> "fieldDefaultValue". >> Looking at the output of "PRAGMA table_info(

[sqlite] Retrieving the table info fails

2015-11-16 Thread Igor Korot
Stephan, On Mon, Nov 16, 2015 at 12:42 PM, Stephan Beal wrote: > On Mon, Nov 16, 2015 at 6:11 PM, Igor Korot wrote: > >> The variables referenced are defined as "std::string" and the code is in >> C++. >> > > the std::string(char const *) constructor

[sqlite] Retrieving the table info fails

2015-11-16 Thread Igor Korot
Hi, On Mon, Nov 16, 2015 at 2:20 PM, R Smith wrote: > > > On 2015/11/16 7:59 PM, Igor Korot wrote: >> >> Stephan, >> >> On Mon, Nov 16, 2015 at 12:42 PM, Stephan Beal >> wrote: >>> >>> On Mon, Nov 16, 2015 at 6:11 PM, Igor Korot wro

[sqlite] Retrieving the table info fails

2015-11-16 Thread Igor Korot
Simon, On Mon, Nov 16, 2015 at 3:13 PM, Simon Slavin wrote: > > On 16 Nov 2015, at 7:40pm, Igor Korot wrote: > >> But if I issue this PRAGMA command the field name, field type and the PK >> are guaranteed to have some values, right? > > No. Create a field with

[sqlite] Retrieving the table info fails

2015-11-16 Thread Igor Korot
Simon, On Mon, Nov 16, 2015 at 4:20 PM, Simon Slavin wrote: > > On 16 Nov 2015, at 9:09pm, Igor Korot wrote: > >> 1|name|varchar(100)|0 | |0 > > Note that this does not tell you anything about the affinity of the column, > or

[sqlite] Retrieving the table info fails

2015-11-16 Thread Igor Korot
Igor, On Mon, Nov 16, 2015 at 4:50 PM, Igor Tandetnik wrote: > On 11/16/2015 4:20 PM, Simon Slavin wrote: >> >> >> On 16 Nov 2015, at 9:09pm, Igor Korot wrote: >> >>> 1|name|varchar(100)|0 | |0 >> >> &g

[sqlite] sqlite3_errmsg and wide char

2015-11-27 Thread Igor Korot
Hi, Is there any way to have "sqlite3_errmsg" function return a wide char string? Or do a conversion in a portable way? Thank you.

[sqlite] sqlite3_errmsg and wide char

2015-11-27 Thread Igor Korot
Hi, Scott, On Fri, Nov 27, 2015 at 1:01 AM, Scott Robison wrote: > On Thu, Nov 26, 2015 at 10:13 PM, Igor Korot wrote: >> >> Hi, >> Is there any way to have "sqlite3_errmsg" function return a wide char > string? >> Or do a conversion in a portable wa

[sqlite] sqlite3_errmsg and wide char

2015-11-27 Thread Igor Korot
Hi, guys. But what about Linux/Mac? Can I use that function there? Thank you. On Nov 27, 2015 9:54 AM, "Dominique Devienne" wrote: > On Fri, Nov 27, 2015 at 2:45 PM, OBones wrote: > > > Dominique Devienne wrote: > > > >> That's UTF-16, while a wstring is expected to be in the current locale >

[sqlite] Query

2015-09-03 Thread Igor Korot
Hi, On Thu, Sep 3, 2015 at 5:33 AM, manash b wrote: > Hello, > > > I am using SQLite version 3.8.11.1 and PHP for my web application. > > Table *employee* has 4 columns. Last two columns have default NULL values. > > Insert query - > > > > *INSERT INTO employee SELECT 3 AS 'eid','manash' AS

[sqlite] sql query

2015-09-10 Thread Igor Korot
Hi, On Thu, Sep 10, 2015 at 1:17 PM, H?ctor Fiandor wrote: > Dear members: > > I am trying to use a SQL statement like this: > > fdm.tNegSerAct.SQL:='SELECT * FROM NegSerAct > > WHERE codNegSerAct >=desde AND codNegSerAct <=hasta > > ORDER BY codNegSerAct'; > > > > but the trouble is

[sqlite] sqlite3_column_decltype change

2016-04-05 Thread Igor Korot
Hi, On Tue, Apr 5, 2016 at 1:57 PM, L?szl? B?sz?rm?nyi (GCS) wrote: > Hi, > > It seems sqlite3_column_decltype() is changed in 3.12.0 without > mentioning it in the changelog. A test case is attached. Using 3.11.1, > the result is not quoted, with 3.12.0 it is. > As such, the former outputs:

[sqlite] autoincrement

2016-04-13 Thread Igor Korot
Hi, Is it possible to get whether the column is set to autoincrement or not? PRAGMA table_info() does not give such info... Thank you.

[sqlite] autoincrement

2016-04-13 Thread Igor Korot
13, 2016 at 4:54 AM, Igor Korot wrote: >> Hi, >> Is it possible to get whether the column is set to autoincrement or not? >> >> PRAGMA table_info() does not give such info... >> >> Thank you. >> ___ >> s

[sqlite] autoincrement

2016-04-13 Thread Igor Korot
Hi, Kees, On Wed, Apr 13, 2016 at 12:15 PM, Kees Nuyt wrote: > On Wed, 13 Apr 2016 10:58:54 -0400, Igor Korot > wrote: > >> Hi,, >> >>On Wed, Apr 13, 2016 at 10:54 AM, J Decker wrote: >>> Yes, you can get the create statement from sqlite_master table >

[sqlite] autoincrement

2016-04-13 Thread Igor Korot
face, you > can identify autoincrement columns using sqlite3_table_column_metadata. I will test that when I come home from work. Thank you. > > Peter > > On Wednesday, April 13, 2016 9:40 AM, Igor Korot > wrote: > > > > Hi, Kees, > > On Wed, Apr 13, 2016

[sqlite] autoincrement

2016-04-13 Thread Igor Korot
Hi, On Wed, Apr 13, 2016 at 1:54 PM, Igor Korot wrote: > Hi, Peter, > > On Wed, Apr 13, 2016 at 1:16 PM, Peter Aronson wrote: >> There is one limitation to this approach, however. The entry for an >> autoincrement column in the sqlite_sequence table isn't made un

[sqlite] No datasize field - why?

2016-04-22 Thread Igor Korot
Hi, ALL, [code] SQLite version 3.9.2 2015-11-02 18:31:45 Enter ".help" for usage hints. sqlite> PRAGMA table_info(league); sqlite> PRAGMA table_info(leagues); 0|id|integer|0||1 1|name|varchar(100)|0||0 2|drafttype|integer(1)|0||0 3|scoringtype|integer(1)|0||0 4|roundvalues|integer(1)|0||0

[sqlite] No datasize field - why?

2016-04-22 Thread Igor Korot
Hi, Simon, On Fri, Apr 22, 2016 at 9:23 AM, Simon Slavin wrote: > > On 22 Apr 2016, at 2:09pm, Igor Korot wrote: > >> The field type is set to be "varchar(100)" for the name field. >> Wouldn't it be more logical to have it as "varchar" and have ano

[sqlite] No datasize field - why?

2016-04-23 Thread Igor Korot
Hi, Keith, On Sat, Apr 23, 2016 at 5:56 AM, Keith Medcalf wrote: >> > What you are seeing there is SQLite just repeating back the type that >> the CREATE TABLE command used. It is not the type of data SQLite is >> actually storing. > >> > There is no 'varchar' datatype in SQLite. And it never

[sqlite] No datasize field - why?

2016-04-23 Thread Igor Korot
On Sat, Apr 23, 2016 at 3:22 PM, Richard Hipp wrote: > On 4/23/16, Igor Korot wrote: >> I merely tried to ask why in SQLite one can't have an information >> about the table field size - that is all. > > Answer: That information would consume memory. Thank you. That was tha

[sqlite] Illegal SQL not rejected

2016-04-29 Thread Igor Korot
Hi, On Fri, Apr 29, 2016 at 1:28 PM, John McKown wrote: > On Fri, Apr 29, 2016 at 12:00 PM, Jann Roder > wrote: > >> Hi, >> It seems like a too obvious omission to not be intentional. But I wonder >> why a query like >> >> SELECT SUM(A) >> FROM TABLE >> GROUP BY B >> HAVING A <> 0 >> >> Is not

[sqlite] Illegal SQL not rejected

2016-04-29 Thread Igor Korot
age- > From: sqlite-users-bounces at mailinglists.sqlite.org > [mailto:sqlite-users-bounces at mailinglists.sqlite.org] On Behalf Of Igor > Korot > Sent: Friday, April 29, 2016 1:42 PM > To: SQLite mailing list > Subject: Re: [sqlite] Illegal SQL not rejected > > Hi, > >

[sqlite] database disk image is malformed

2016-04-30 Thread Igor Korot
Hi, I just updated my system along with the compiler from 4.x to 5.2. And now I start receiving the aforementioned errors trying to start Anjuta. I tried to open the db file with sqlite3 - it opens, but running "PRAGMA integrity_check" it immediately gives: igor at IgorDellGentoo

[sqlite] database disk image is malformed

2016-04-30 Thread Igor Korot
Simon, On Sat, Apr 30, 2016 at 10:12 PM, Simon Slavin wrote: > > On 1 May 2016, at 2:39am, Igor Korot wrote: > >> How do I recover the information? > > Do you have a copy of that file from before you updated ? Can you run > integrity_check() on it ? IIUC, this file di

[sqlite] How to enter Unicode character?

2016-02-08 Thread Igor Korot
Hi, ALL, I live in US and therefore have an English-based laptop with an English-based keyboard. I am also a programmer and would like to test what happen if I have a SQLite table which contains a Unicode character. Now my question is: is it possible to enter a Unicode character (umlaut symbol,

[sqlite] How to enter Unicode character?

2016-02-08 Thread Igor Korot
Hi, On Mon, Feb 8, 2016 at 10:21 AM, Stephan Beal wrote: > On Mon, Feb 8, 2016 at 4:17 PM, Igor Korot wrote: > >> Hi, ALL, >> I live in US and therefore have an English-based laptop with an >> English-based keyboard. >> >> I am also a programmer and woul

[sqlite] How to enter Unicode character?

2016-02-08 Thread Igor Korot
Dominique, Stehan, On Mon, Feb 8, 2016 at 10:36 AM, Dominique Devienne wrote: > On Mon, Feb 8, 2016 at 4:28 PM, Dominique Devienne > wrote: > >> On Mon, Feb 8, 2016 at 4:17 PM, Igor Korot wrote: >> >>> Now my question is: is it possible to enter a Unicode cha

[sqlite] How to enter Unicode character?

2016-02-08 Thread Igor Korot
Dominique, On Mon, Feb 8, 2016 at 11:43 AM, Dominique Devienne wrote: > On Mon, Feb 8, 2016 at 5:33 PM, Dominique Devienne > wrote: > >> On Mon, Feb 8, 2016 at 4:46 PM, Igor Korot wrote: >> >>> On Mon, Feb 8, 2016 at 10:36 AM, Dominique Devienne >>>

[sqlite] How to enter Unicode character?

2016-02-09 Thread Igor Korot
Hi, On Tue, Feb 9, 2016 at 3:09 AM, Dominique Devienne wrote: > On Mon, Feb 8, 2016 at 6:26 PM, Dominique Devienne > wrote: > >> OK, I retried with latest sqlite3.exe, and the results are different: >> >> C:\Users\DDevienne>sqlite3 >> SQLite version 3.10.2 2016-01-20 15:27:19 >> Enter ".help"

[sqlite] SQLite crashing

2016-02-09 Thread Igor Korot
'm running on Windows 8.1. SQLite is compiled into my application and the source is from couple of days ago. What are the conditions when the application will not be able to acquire the global file lock? Thank you. On Sun, Jan 31, 2016 at 1:11 PM, Olivier Mascia wrote: >> Le 31 janv. 2016

[sqlite] Can SQLite be used from DLL

2016-02-25 Thread Igor Korot
Hi, I'm trying to design/make a program where I will use SQLite from the DLL. What I mean is I will establish a connection inside a DLL but disconnect from the database in my main application. It turns out that doing so I am getting the crash when I try to disconnect from the database file.

[sqlite] Can SQLite be used from DLL

2016-02-26 Thread Igor Korot
Hello, Teg, On Fri, Feb 26, 2016 at 11:41 AM, Teg wrote: > Hello Igor, > > I use Sqlite through a DLL interface. I mean I have another DLL that > includes Sqlite static linked inside it. All opening, closing and > access to Sqlite takes place inside the context of the DLL. The > application

[sqlite] Parsing the contents of a field

2016-01-13 Thread Igor Korot
Hi, On Wed, Jan 13, 2016 at 10:05 AM, Jim Morris wrote: > Might be doable with a recursive CTE > > On 1/13/2016 1:22 AM, Bart Smissaert wrote: >> >> It probably can be done with just SQLite's built-in text functions such as >> instr and substr, >> although with 20 to 30 items it may get a bit

[sqlite] Updating the contents of a field in table A with the value of the same field in table B

2016-01-16 Thread Igor Korot
Hi, On Sat, Jan 16, 2016 at 12:58 AM, audio muze wrote: > Apologies if I'm asking an obvious question, but I've searched and > tried various options and have not been able to arrive at an UPDATE > statement in SQLite that does what I need. > > I've two tables with a unique identifier that

[sqlite] SQLite crashing

2016-01-25 Thread Igor Korot
Hi, ALL, I have a strange problem. I am trying to use sqlite in my program. It has a main application and couplef DLLs. I am getting the connection in one of the DLL, then the pointer is passed up to the main application. Upon exiting from the application I'm trying to close the connection and

  1   2   3   4   5   >