Re: [sqlite] Is there a way to create a foreign key in existing table?

2013-03-01 Thread Igor Korot
Hi, Will foreign key creation give me the speed increase? Or I need more an index? Thank you. On Tue, Jan 1, 2013 at 10:01 AM, Peter Haworth wrote: > And remembering that you will lose any indexes or triggers defined for the > table by doing this. > > There are plenty of third

[sqlite] Happy New Year to everybody on this list

2012-12-31 Thread Igor Korot
Hi, ALL, I want to wish all of you Happy New Year! So that all you problems will be left in 2012 and everything you wish for will take place in 2013. Happy coding!!! Thank you. ___ sqlite-users mailing list sqlite-users@sqlite.org

[sqlite] Is there a way to create a foreign key in existing table?

2012-12-31 Thread Igor Korot
Hi, ALL, Subj, please. I simply forgot to do it on the table creation. And now the table has many rows... Thank you. P.S.: Maybe it is somehow possible to do with "CREATE INDEX..."? ___ sqlite-users mailing list sqlite-users@sqlite.org

Re: [sqlite] Trigger question

2012-12-30 Thread Igor Korot
Hi, Igor, On Sun, Dec 30, 2012 at 6:43 AM, Igor Tandetnik <i...@tandetnik.org> wrote: > Igor Korot <ikoro...@gmail.com> wrote: >> I have: >> >> CREATE TABLE test( id integere primary key, name varchar(70)); >> INSERT INTO test( NULL, "abc def" );

Re: [sqlite] Trigger question

2012-12-30 Thread Igor Korot
Simon, On Sun, Dec 30, 2012 at 2:08 AM, Simon Slavin <slav...@bigfraud.org> wrote: > > On 30 Dec 2012, at 9:52am, Igor Korot <ikoro...@gmail.com> wrote: > >> I want to create a trigger on the table. The trigger will be fired >> before insertion. >> In t

[sqlite] Trigger question

2012-12-30 Thread Igor Korot
Hi, ALL, I want to create a trigger on the table. The trigger will be fired before insertion. In that trigger I want to check if the data is already present. I have: CREATE TABLE test( id integere primary key, name varchar(70)); INSERT INTO test( NULL, "abc def" ); INSERT INTO test( NULL, "def

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

2012-12-29 Thread Igor Korot
Yuriy, On Sat, Dec 29, 2012 at 8:49 PM, Yuriy Kaminskiy <yum...@gmail.com> wrote: > Igor Korot wrote: >> Hi, ALL, >> >> sqlite> CREATE TABLE leagueplayers(id integer, playerid integer, value >> integer, >> currvalue double, foreign key(id) refere

[sqlite] What is wrong with this queries?

2012-12-29 Thread Igor Korot
Hi, ALL, sqlite> CREATE TABLE leagueplayers(id integer, playerid integer, value integer, currvalue double, foreign key(id) references leagues(id), foreign key(playerid) references players(playerid)); sqlite> INSERT INTO leagueplayers VALUES(1,(SELECT playerid,value,currvalue FROM players));

Re: [sqlite] What is the easiest way of changing the field type?

2012-12-03 Thread Igor Korot
Simon, On Mon, Dec 3, 2012 at 11:03 AM, Simon Slavin <slav...@bigfraud.org> wrote: > > On 3 Dec 2012, at 6:53pm, Igor Korot <ikoro...@gmail.com> wrote: > >> Yes, using standard sqlite3 shell from command prompt in Windows 7 64-bit. >> After .dump/.read no queries

Re: [sqlite] What is the easiest way of changing the field type?

2012-12-03 Thread Igor Korot
Simon, On Mon, Dec 3, 2012 at 9:39 AM, Simon Slavin <slav...@bigfraud.org> wrote: > > On 3 Dec 2012, at 5:38pm, Igor Korot <ikoro...@gmail.com> wrote: > >> Simon, >> Yes, thank you. > > Great. > >> ALL, >> After recreating the table this way I

Re: [sqlite] What is the easiest way of changing the field type?

2012-12-03 Thread Igor Korot
Simon, Yes, thank you. ALL, After recreating the table this way I had to restart sqlite console as otherwise all queries to the table were dead. Is this normal? Thank you. On Mon, Dec 3, 2012 at 1:42 AM, Simon Slavin <slav...@bigfraud.org> wrote: > > On 3 Dec 2012, at 1:08am, Igor

Re: [sqlite] What is the easiest way of changing the field type?

2012-12-02 Thread Igor Korot
Donald, On Sun, Dec 2, 2012 at 7:22 PM, Donald Griggs wrote: > Regarding: > > *How do I do that? > I thought that simply using ".backup/.restore" will give me what I want, > but it gives me a file in internal format. > What I am trying to do is do make a text file which gives

Re: [sqlite] What is the easiest way of changing the field type?

2012-12-02 Thread Igor Korot
Jay, On Sun, Dec 2, 2012 at 1:31 PM, Jay A. Kreibich <j...@kreibi.ch> wrote: > On Sun, Dec 02, 2012 at 12:52:33PM -0800, Igor Korot scratched on the wall: >> Jay, >> >> On Sun, Dec 2, 2012 at 12:16 PM, Jay A. Kreibich <j...@kreibi.ch> wrote: >> > On S

Re: [sqlite] What is the easiest way of changing the field type?

2012-12-02 Thread Igor Korot
Jay, On Sun, Dec 2, 2012 at 12:16 PM, Jay A. Kreibich <j...@kreibi.ch> wrote: > On Sun, Dec 02, 2012 at 11:58:54AM -0800, Igor Korot scratched on the wall: >> Hi, ALL, >> ALTER TABLE command does not support changing the field type. >> >> What is the easiest an

[sqlite] What is the easiest way of changing the field type?

2012-12-02 Thread Igor Korot
Hi, ALL, ALTER TABLE command does not support changing the field type. What is the easiest and fastest way to change the field type from integer to double? I know it is all saved as text but for me when I look at the db structure I know what kind of variable I will use and what calculation

Re: [sqlite] EXT :Re: Compiling SQLite3 with MSVC 2010

2012-11-04 Thread Igor Korot
rnings. Level 4 starts complaining >> loudly. >> >> >> Michael D. Black >> Senior Scientist >> Advanced Analytics Directorate >> Advanced GEOINT Solutions Operating Unit >> Northrop Grumman Information Systems >> >>

Re: [sqlite] SQLite leaks memory

2012-11-04 Thread Igor Korot
Hi, Clemens, On Sun, Nov 4, 2012 at 3:11 AM, Clemens Ladisch <clem...@ladisch.de> wrote: > Igor Korot wrote: >> When the user asks to edit the data it starts the transaction, then >> set the "SAVEPOINT" > > Why do you need a savepoint in addition to the tran

[sqlite] SQLite leaks memory

2012-11-04 Thread Igor Korot
Hi, ALL, I have a very interesting situation. I'm trying to compile my project using Visual Studio 2010. It is a C++ executable and I just inserted the source code from the amalgamation archive into the project. I also changed the settings for the sqlite3.c to be recognized as a "C" source code

Re: [sqlite] Compiling SQLite3 with MSVC 2010

2012-11-03 Thread Igor Korot
Joe, On Fri, Nov 2, 2012 at 5:32 PM, Joe Mistachkin <sql...@mistachkin.com> wrote: > > Igor Korot wrote: >> >> Warning Level: /W4 >> Trying to compile it in the debug mode with WIN32, UNICODE, >> Multi-threaded Debug DLL (/MDd). >> > > The /W4 op

Re: [sqlite] Compiling SQLite3 with MSVC 2010

2012-11-03 Thread Igor Korot
Simon, On Fri, Nov 2, 2012 at 5:05 PM, Simon Slavin <slav...@bigfraud.org> wrote: > > On 2 Nov 2012, at 11:52pm, Igor Korot <ikoro...@gmail.com> wrote: > >> But C program should compile fine whether you use C or C++ compiler. >> >> Is it not? > >

Re: [sqlite] Compiling SQLite3 with MSVC 2010

2012-11-02 Thread Igor Korot
Hi, Joe, On Fri, Nov 2, 2012 at 4:34 PM, Joe Mistachkin <sql...@mistachkin.com> wrote: > > Igor Korot wrote: >> >> I just read this link. Interesting information. >> IIUC, all those warnings are harmless and they do not appear on other > platforms. >> Which

Re: [sqlite] Compiling SQLite3 with MSVC 2010

2012-11-02 Thread Igor Korot
Richard, On Fri, Nov 2, 2012 at 4:32 PM, Richard Hipp <d...@sqlite.org> wrote: > On Fri, Nov 2, 2012 at 7:25 PM, Igor Korot <ikoro...@gmail.com> wrote: > >> Richard, >> >> On Fri, Nov 2, 2012 at 4:14 PM, Richard Hipp <d...@sqlite.org> wrote: >> >

Re: [sqlite] Compiling SQLite3 with MSVC 2010

2012-11-02 Thread Igor Korot
Richard, On Fri, Nov 2, 2012 at 4:14 PM, Richard Hipp <d...@sqlite.org> wrote: > On Fri, Nov 2, 2012 at 7:05 PM, Igor Korot <ikoro...@gmail.com> wrote: > >> Hi, ALL, >> Is anybody trying to compile SQLite with MSVC 2010? >> > > Tests 9e and 9f at http:/

[sqlite] Compiling SQLite3 with MSVC 2010

2012-11-02 Thread Igor Korot
Hi, ALL, Is anybody trying to compile SQLite with MSVC 2010? I am getting a lot of warnings. Is there any interest in fixing those? If not what is the policy of using SQLite3 code? I'm using 3.7.14 release. Thank you. ___ sqlite-users mailing list

Re: [sqlite] Calling "ROLLBACK" outside transaction

2012-10-28 Thread Igor Korot
Dan, On Sun, Oct 28, 2012 at 10:07 PM, Dan Kennedy <danielk1...@gmail.com> wrote: > On 10/29/2012 07:35 AM, Igor Korot wrote: >> >> Hi, ALL, >> Will I be punished if I call ROLLBACK outside transaction? > > > No. You will be rewarded with an error code t

[sqlite] Calling "ROLLBACK" outside transaction

2012-10-28 Thread Igor Korot
Hi, ALL, Will I be punished if I call ROLLBACK outside transaction? Thing is I'm trying to write a function in C++ that will be used mostly inside transactions but the usage will be general. So if there is an error I want to ROLLBACK, but I don't want to keep track of where am I: inside

Re: [sqlite] Mac development question

2012-10-26 Thread Igor Korot
List, Apologies for moving off-topic. The discussion is now moved to be on PM. Thank you. On Wed, Oct 24, 2012 at 3:39 AM, Simon Slavin <slav...@bigfraud.org> wrote: > > On 24 Oct 2012, at 5:29am, Igor Korot <ikoro...@gmail.com> wrote: > >> It looks like you ar

Re: [sqlite] Mac development question

2012-10-23 Thread Igor Korot
Darren, On Tue, Oct 23, 2012 at 8:53 PM, Darren Duncan <dar...@darrenduncan.net> wrote: > Igor Korot wrote: >> >> Well, that the closest definition of the data I'm about to put into >> this database. >> I am making a sport related application and need to store the

Re: [sqlite] Mac development question

2012-10-23 Thread Igor Korot
Simon, On Tue, Oct 23, 2012 at 5:24 PM, Simon Slavin <slav...@bigfraud.org> wrote: > > On 23 Oct 2012, at 11:41pm, Igor Korot <ikoro...@gmail.com> wrote: > >> On Tue, Oct 23, 2012 at 3:10 PM, Simon Slavin <slav...@bigfraud.org> wrote: >> >>&g

Re: [sqlite] Mac development question

2012-10-23 Thread Igor Korot
Hi, On Tue, Oct 23, 2012 at 3:10 PM, Simon Slavin <slav...@bigfraud.org> wrote: > > On 23 Oct 2012, at 10:35pm, Igor Korot <ikoro...@gmail.com> wrote: > >> On Tue, Oct 23, 2012 at 2:26 PM, Doug Currie <doug.cur...@gmail.com> wrote: >>> >>

Re: [sqlite] Mac development question

2012-10-23 Thread Igor Korot
Hi, Doug, On Tue, Oct 23, 2012 at 2:26 PM, Doug Currie <doug.cur...@gmail.com> wrote: > > On Oct 23, 2012, at 4:58 PM, Igor Korot <ikoro...@gmail.com> wrote: > >> 1. I know on Mac I need to build an application bundle. Where do I >> store the .db file relative

[sqlite] Mac development question

2012-10-23 Thread Igor Korot
Hi, ALL, I'm developing a program that will be cross-platform and utilize SQLite database. My main development platform is Windows and when I finish I will move to Mac. My question is: 1. I know on Mac I need to build an application bundle. Where do I store the .db file relative to the bundle?

Re: [sqlite] Transaction inside transaction

2012-10-22 Thread Igor Korot
Darren, On Sun, Oct 21, 2012 at 11:01 PM, Darren Duncan <dar...@darrenduncan.net> wrote: > Igor Korot wrote: >> >> Hi, ALL, >> Is it possible to have transaction inside transaction? Will it be >> handled correctly? >> >> What I mean is: c

Re: [sqlite] Transaction inside transaction

2012-10-21 Thread Igor Korot
Dan, On Sun, Oct 21, 2012 at 9:40 PM, Dan Kennedy <danielk1...@gmail.com> wrote: > On 10/22/2012 11:34 AM, Igor Korot wrote: >> >> Hi, ALL, >> Is it possible to have transaction inside transaction? Will it be >> handled correctly? >> >> What I m

[sqlite] Transaction inside transaction

2012-10-21 Thread Igor Korot
Hi, ALL, Is it possible to have transaction inside transaction? Will it be handled correctly? What I mean is: crate transaction 1 by issuing "BEGIN", create transaction 2 by issuing "BEGIN". Close transaction 2 by issuing either "COMMIT" or "ROLLBACK". If "ROLLBACK" is issued, issue "ROLLBACK" on

Re: [sqlite] Question about foreign key

2012-10-21 Thread Igor Korot
Hi, Simon, On Sun, Oct 21, 2012 at 12:05 AM, Simon Slavin <slav...@bigfraud.org> wrote: > > On 21 Oct 2012, at 7:35am, Igor Korot <ikoro...@gmail.com> wrote: > >> database. In order for that to happen properly I need the >> foreing key constraint to be included.

Re: [sqlite] Question about foreign key

2012-10-21 Thread Igor Korot
Hi, Keith, On Sat, Oct 20, 2012 at 11:10 PM, Keith Medcalf <kmedc...@dessus.com> wrote: > On Saturday, 20 October, 2012 at 23:42, Igor Korot <ikoro...@gmail.com> wrote: > >> According to http://www.sqlite.org/foreignkeys.html the FOREIGN KEY >> support is disabled by

[sqlite] Question about foreign key

2012-10-20 Thread Igor Korot
Hi, ALL, According to http://www.sqlite.org/foreignkeys.html the FOREIGN KEY support is disabled by default. In order to enable it I need to compile SQLITE with 2 defines undefined. I downloaded the file sqlite-amalgamation-3071400.zip, unpacked it, added .c and .h file to my project and

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] 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
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

<    1   2   3   4   5