Re: [sqlite] Weird issue with the query

2016-12-02 Thread Igor Korot
Igor Ok so in order to fix it I should assign the result of conversion to some variable? Thank you. On Dec 2, 2016 9:07 PM, "Igor Tandetnik" <i...@tandetnik.org> wrote: On 12/2/2016 8:39 PM, Igor Tandetnik wrote: > On 12/2/2016 6:56 PM, Igor Korot wrote: > >>

Re: [sqlite] Weird issue with the query

2016-12-02 Thread Igor Korot
Igor Ok so in order to fix it I should assign the result of conversion to some variable? Thank you. On Dec 2, 2016 9:07 PM, "Igor Tandetnik" <i...@tandetnik.org> wrote: > On 12/2/2016 8:39 PM, Igor Tandetnik wrote: > >> On 12/2/2016 6:56 PM, Igor Kor

Re: [sqlite] Weird issue with the query

2016-12-02 Thread Igor Korot
On Fri, Dec 2, 2016 at 6:56 PM, Igor Korot <ikoro...@gmail.com> wrote: > 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 com

[sqlite] Happy New Year!

2016-12-31 Thread Igor Korot
Hi Happy New year to people on this lists. Many more releases and without bugs. :-) ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] How do I see a full query?

2016-12-27 Thread Igor Korot
Keith, On Tue, Dec 27, 2016 at 10:59 PM, Keith Medcalf wrote: > >> > So whether hard coding the empty string in the query or using a >> parameter (in which you can use some value other than an empty string) >> depends on what you will need in the context of the application.

Re: [sqlite] How do I see a full query?

2016-12-27 Thread Igor Korot
Hi, Simon, On Tue, Dec 27, 2016 at 12:14 AM, Simon Slavin <slav...@bigfraud.org> wrote: > > On 27 Dec 2016, at 4:24am, Igor Korot <ikoro...@gmail.com> wrote: > >> I have a weird situation where executing a query in a shell gives me a row, >> but executing the s

Re: [sqlite] How do I see a full query?

2016-12-27 Thread Igor Korot
quot;abt_ownr\" = \'\';"; because abt_ownr field will always be empty (unless there is a way to know what user connected to the DB). Also I'm just curious - am I to run something like: res = sqlite3_bind_text( stmt, 2, "", -1, SQLITE_STATIC ); Thank you. > -

Re: [sqlite] How do I see a full query?

2016-12-27 Thread Igor Korot
mailto:sqlite-users-boun...@mailinglists.sqlite.org] Im > Auftrag von Igor Korot > Gesendet: Dienstag, 27. Dezember 2016 05:24 > An: Discussion of SQLite Database <sqlite-users@mailinglists.sqlite.org>; > General Discussion of SQLite Database <sqlite-us...@sqlite.org> >

Re: [sqlite] How do I see a full query?

2016-12-27 Thread Igor Korot
ot; char(18), "abh_fhgt" smallint, "abh_fwgt" smallint, "abh_fitl" char(1), "abh _funl" char(1), "abh_fchr" smallint, "abh_fptc" smallint, "abh_ffce" char(18), " abl_fhgt" smallint, "abl_fwgt" smallint, "a

[sqlite] How do I see a full query?

2016-12-26 Thread Igor Korot
Hi, ALL, I have a weird situation where executing a query in a shell gives me a row, but executing the same query through the C-interface: sqlite3_prepare_v2(), sqlite3_bind_text() and sqlite3_step() produces SQLITE_DONE. So I wonder - is it possible to see a full query string inside

Re: [sqlite] Create database

2017-04-14 Thread Igor Korot
;> ˙uʍop-ǝpısdn sı ɹoʇıuoɯ ɹnoʎ 'sıɥʇ pɐǝɹ uɐɔ noʎ ɟı >> >> >> > -Original Message- >> > From: sqlite-users [mailto:sqlite-users-boun...@mailinglists.sqlite.org] >> > On Behalf Of Igor Korot >> > Sent: Friday, 14 April, 2017 08:26 >> >

Re: [sqlite] Create database

2017-04-14 Thread Igor Korot
sqlite3_open( name2, _db ); [/pseudo-code] Thank you. > > -- > ˙uʍop-ǝpısdn sı ɹoʇıuoɯ ɹnoʎ 'sıɥʇ pɐǝɹ uɐɔ noʎ ɟı > > >> -Original Message- >> From: sqlite-users [mailto:sqlite-users-boun...@mailinglists.sqlite.org] >> On Behalf Of Igor Korot >>

[sqlite] Create database

2017-04-14 Thread Igor Korot
Hi, If I have a database open with sqlite3_open() and then want to issue another sqlite3_open(), the old database will be closed and the new one will open? Or I have to explicitly call sqlite3_close()? Thank you. ___ sqlite-users mailing list

Re: [sqlite] SQLite Port/ODBC Driver Question

2017-07-10 Thread Igor Korot
Rob, On Mon, Jul 10, 2017 at 7:06 AM, Rob Willett wrote: > Vishal, > > SQLite isn't a traditional client/server relational database, therefore > there isn't a port to open up. It runs on a local machine. I believe SQLite can successfully be run remotely. Thank

Re: [sqlite] Database version

2017-07-21 Thread Igor Korot
Richard, et al, On Fri, Jul 21, 2017 at 2:08 PM, Richard Hipp wrote: > On 7/21/17, Simon Slavin wrote: >> >> The new features introduced by SQLite since it started using file format 3 >> all require explicit commands to use. Adding columns to existing

[sqlite] Database version

2017-07-21 Thread Igor Korot
Hi, ALL, Is there a way to know the version of the .db file I am using? I'd like to issue some kind of SELECT statement to get it. Looks like there is an interface to get the library version, but I don't see anything for a db file. Thank you. ___

Re: [sqlite] Database version

2017-07-21 Thread Igor Korot
Hi, Keith, On Fri, Jul 21, 2017 at 4:17 PM, Keith Medcalf wrote: >>The only trouble is - how do I know what version were used. >>My application may use some features that is available right now and >>I want to use them because they are great. >>But if I open the DB from the

Re: [sqlite] Does it make sense to COMMIT/ROLLBACK?

2017-07-26 Thread Igor Korot
On Wed, Jul 26, 2017 at 12:16 PM, Clemens Ladisch <clem...@ladisch.de> wrote: > Igor Korot wrote: >> If I execute "BEGIN TRANSACTION" and for whatever reason the call will fail >> will I get an error on COMMIT/ROLLBACK execution? > > sqlite> begin immediate

[sqlite] Does it make sense to COMMIT/ROLLBACK?

2017-07-26 Thread Igor Korot
Hi, ALL, If I execute "BEGIN TRANSACTION" and for whatever reason the call will fail will I get an error on COMMIT/ROLLBACK execution? This is an un-named transaction and it is an outmost one. Thank you. ___ sqlite-users mailing list

Re: [sqlite] Database version

2017-07-21 Thread Igor Korot
9:58 AM, "sqlite-users on behalf of Igor Korot" > <sqlite-users-boun...@mailinglists.sqlite.org on behalf of > ikoro...@gmail.com> wrote: > > Hi, ALL, > Is there a way to know the version of the .db file I am using? > > I'd lik

Re: [sqlite] Database version

2017-07-21 Thread Igor Korot
Hi, Andy, On Fri, Jul 21, 2017 at 11:19 AM, Andy Ling wrote: >>Let's say I made some database files 2 years ago. >>Now I want the current SQLite code to open them and performs some queries >>from the C interface. > > I would ask why do you care? Sqlite will read old

Re: [sqlite] Database version

2017-07-21 Thread Igor Korot
t db file. Thank you. > > On 7/21/17, 10:46 AM, "sqlite-users on behalf of Igor Korot" > <sqlite-users-boun...@mailinglists.sqlite.org on behalf of > ikoro...@gmail.com> wrote: > > Hi, Peter et al, > > On Fri, Jul 21, 2017 at 11:35 A

Re: [sqlite] Database version

2017-07-21 Thread Igor Korot
Hi, Bob, On Fri, Jul 21, 2017 at 11:27 AM, Bob Friesenhahn <bfrie...@simple.dallas.tx.us> wrote: > On Fri, 21 Jul 2017, Igor Korot wrote: >> >> >> In my "Help -> About..." I'd like to say something like: >> >> "Using SQLite

Re: [sqlite] Database version

2017-07-21 Thread Igor Korot
Hi, Peter et al, On Fri, Jul 21, 2017 at 11:35 AM, Peter Da Silva wrote: > The problem is that SQLITE_VERSION_NUMBER is not “the database version”, it’s > something like “the last version of SQLite that committed a transaction”. > > The database version number is

[sqlite] FOREING KEY constraint

2017-07-02 Thread Igor Korot
Hi, ALL, Is SQLite supports naming a foreign key constraint? And if it does - is there a way to check for its uniqueness? Thank you. ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org

Re: [sqlite] FOREING KEY constraint

2017-07-03 Thread Igor Korot
Hi, Keith et al, On Mon, Jul 3, 2017 at 7:13 AM, Keith Medcalf wrote: > > From what I can tell the answer is (A). The constraint_name is simply a > comment to be reported (if possible) when the constraint is violated. So is it possible to check that the foreign key with

Re: [sqlite] SQLITE PHP syntax issues - INSERT INTO db

2017-08-08 Thread Igor Korot
Hi, On Tue, Aug 8, 2017 at 12:58 PM, Jens Alfke wrote: > >> On Aug 5, 2017, at 6:48 AM, Edmondo Borasio wrote: >> >> *$query1="INSERT INTO Table"."(ID,name,surname)"."VALUES(\' ' . $NewID . >> '\','newName','newSurname');"; * > > It’s a very, very

Re: [sqlite] checking if a table exists

2017-09-22 Thread Igor Korot
query: SELECT 1 FROM sqlite_master WHERE type = 'table' and name = ?;"; And then bind the actual variable to the query. If the execution return a row the table exists. Thank you. > > Mike > >> On Sep 22, 2017, at 15:24, Igor Korot <ikoro...@gmail.com> wrote: >&g

Re: [sqlite] checking if a table exists

2017-09-22 Thread Igor Korot
Hi, On Fri, Sep 22, 2017 at 4:04 PM, David Raymond wrote: > Not familiar with perl, but... > > -You should never need to do writable_schema = on for any normal operation. > You can always read the schema even without that. > > -To my untrained eye it looks like you

Re: [sqlite] bug when saving database under dos

2017-09-22 Thread Igor Korot
Hi, On Fri, Sep 22, 2017 at 11:36 AM, janezz55 . wrote: > Hello! Saving the database under dos-compiled sqlite does not work. How can > I go about debugging this (probably, just a small fix is necessary)? Maybe > you have experience with this bug? I made an image of the

Re: [sqlite] How to handle such situation

2017-10-04 Thread Igor Korot
Hi, Jens, On Wed, Oct 4, 2017 at 6:15 PM, Jens Alfke <j...@mooseyard.com> wrote: > > >> On Oct 4, 2017, at 2:20 PM, Igor Korot <ikoro...@gmail.com> wrote: >> >> If I start transaction, all queries were successful, but issuing "COMMIT" >> fail

Re: [sqlite] How to handle such situation

2017-10-04 Thread Igor Korot
gt; On October 4, 2017 6:15:55 PM EDT, Jens Alfke <j...@mooseyard.com> wrote: >> >> >>> On Oct 4, 2017, at 2:20 PM, Igor Korot <ikoro...@gmail.com> wrote: >>> >>> If I start transaction, all queries were successful, but issuing >>"CO

Re: [sqlite] How to handle such situation

2017-10-06 Thread Igor Korot
Hi Keith, On Oct 6, 2017 12:59 PM, "Keith Medcalf" wrote: The return code will tell you the cause of the failure Love them. Check them. Every time. I'm checking them. But if there is a ROLLBACK failure I will tell the user and when the app will close sqlite3_close()

Re: [sqlite] How to handle such situation

2017-10-05 Thread Igor Korot
Jens, You mean like have some kind of flag and display an error on disconnect only if not set? Thank you. On Oct 5, 2017 11:32 AM, "Jens Alfke" <j...@mooseyard.com> wrote: > > > > On Oct 4, 2017, at 7:16 PM, Igor Korot <ikoro...@gmail.com> wrote:

Re: [sqlite] How to handle such situation

2017-10-05 Thread Igor Korot
AM, "Simon Slavin" <slav...@bigfraud.org> wrote: > > > On 5 Oct 2017, at 4:35pm, Igor Korot <ikoro...@gmail.com> wrote: > > > You mean like have some kind of flag and display an error on disconnect > > only if not set? > > If ROLLBACK fails,

Re: [sqlite] How to handle such situation

2017-10-05 Thread Igor Korot
Hi Simon et al, So I shouldn't card if _close() fail either way? Just give an error and quit? Thank you. On Oct 5, 2017 2:01 PM, "Simon Slavin" <slav...@bigfraud.org> wrote: On 5 Oct 2017, at 6:42pm, Igor Korot <ikoro...@gmail.com> wrote: > My question here is

[sqlite] CREATE FOREIGN KEY support

2017-09-26 Thread Igor Korot
Hi, ALL, I believe the creation a foreign key on the existing tables is not supported on SQLite. However, I can issue a series of the SQL command which will emulate the creation of foreign key. 1. BEGIN 2. CREATE TEMPORARY TABLE temp AS SELECT * FROM ; 3. DROP TABLE ; 4. CREATE TABLE (, FOREIGN

Re: [sqlite] Is this behavior expected?

2017-09-24 Thread Igor Korot
Hi, On Sun, Sep 24, 2017 at 7:46 AM, Baruch Burstein wrote: > SQLite version 3.20.1 2017-08-24 16:21:36 > sqlite> create table T(C); > sqlite> insert into T values("test 1"); > sqlite> select last_insert_rowid(); > 1 > sqlite> begin; > sqlite> insert into T values("test

Re: [sqlite] FULLMUTEX and exclusive transactions between threads

2017-09-28 Thread Igor Korot
Hi, Simon, On Thu, Sep 28, 2017 at 11:55 AM, Simon Slavin wrote: > > > On 28 Sep 2017, at 3:31pm, pisymbol . wrote: > >> Specificially, if thread 1 and 2 both have a handle to sqlite3 with full >> mutex, then both could start a transaction

Re: [sqlite] FULLMUTEX and exclusive transactions between threads

2017-09-28 Thread Igor Korot
Not if you use connection-per-thread model. On Thu, Sep 28, 2017 at 3:07 PM, Simon Slavin wrote: > > > On 28 Sep 2017, at 8:01pm, pisymbol . wrote: > >> So you can still have issues with thread 1 issuing a "BEGIN" and then >> thread 2 issuing another

Re: [sqlite] Please remove multiple warnings from compiler about optimisation, variable conversion, signed overflow and many more potential errors.

2017-09-29 Thread Igor Korot
Simon, On Fri, Sep 29, 2017 at 4:38 PM, Simon Slavin wrote: > > > On 29 Sep 2017, at 9:06pm, Denis V. Razumovsky wrote: > >> What can be wrong for _any_ of the compilers if you will define >> SQLITE_4_BYTE_ALIGNED_MALLOC as 0 in sqlite3.h? It's so simple. I

Re: [sqlite] CREATE FOREIGN KEY support

2017-09-27 Thread Igor Korot
Hi, Clemens, On Wed, Sep 27, 2017 at 7:04 AM, Clemens Ladisch <clem...@ladisch.de> wrote: > Igor Korot wrote: >> 3. DROP TABLE ; >> >> On step 3 all ttriggers and indexes will be dropped as well, right? > > Yes. > >> 4. CREATE TABLE (, FOREIGN KEY() REFER

[sqlite] sqlite3_column_text() return value

2017-08-26 Thread Igor Korot
Hi, Is there a reason why the aforementioned function returns "const unsigned char *" instead of just "const char *"? Will I miss anything if I cast out "unsigned"? Thank you. ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org

Re: [sqlite] sqlite3_column_text() return value

2017-08-26 Thread Igor Korot
Richard, On Sat, Aug 26, 2017 at 2:19 PM, Richard Hipp <d...@sqlite.org> wrote: > On 8/26/17, Igor Korot <ikoro...@gmail.com> wrote: >> Hi, >> Is there a reason why the aforementioned function returns "const unsigned >> char *" instead of just "con

Re: [sqlite] My 1st C++ SQLite3 program

2017-08-26 Thread Igor Korot
Hi, On Sat, Aug 26, 2017 at 9:34 PM, Papa wrote: > class SQLite3_RDB { > private: > sqlite3* db; //!< Data Base > std::string database_name; >public: > SQLite3_RDB(); > ~SQLite3_RDB(){sqlite3_close(db); } > }; >

Re: [sqlite] My 1st C++ SQLite3 program

2017-08-27 Thread Igor Korot
Hi, Chris, On Sun, Aug 27, 2017 at 6:53 PM, Chris Waters wrote: > Pardon my abject ignorance of C and C++. But just a quick naive observation. > Does it have anything to do with the fact that the string is declared > "database_name", but the invocation uses

Re: [sqlite] My 1st C++ SQLite3 program

2017-08-27 Thread Igor Korot
Hi, On Sun, Aug 27, 2017 at 10:35 AM, Papa wrote: > First and foremost, I'd like to thank everybody for your replies. > Although I have sound knowledge and understanding of C++ [ that can be > debatable ] and still remember a little how C works, I have no Idea how to > utilize

Re: [sqlite] My 1st C++ SQLite3 program

2017-08-27 Thread Igor Korot
On Sun, Aug 27, 2017 at 10:55 AM, Tim Streater wrote: > On 27 Aug 2017, at 15:35, Papa wrote: > >> First and foremost, I'd like to thank everybody for your replies. >> Although I have sound knowledge and understanding of C++ [ that can be >> debatable ]

Re: [sqlite] My 1st C++ SQLite3 program

2017-08-28 Thread Igor Korot
Don, On Mon, Aug 28, 2017 at 6:33 AM, Don V Nielsen wrote: > database_name is never assigned a value? In SQLite3_RDB::SQLite3_RDB() it > is spelled databese_name? That is OK. The class member is not used anywhere and the "dxatabese_name" local is used instead. Thank you.

Re: [sqlite] SQL statement and C++

2017-09-01 Thread Igor Korot
Hi, What are you trying to achieve? Are you trying to perform a "VACUUM" command on the data base? Thank you. On Sep 1, 2017 2:23 PM, "Papa" wrote: In this snip, I'd like to show a brief description of what the class member function should do, in order to ask you if the SQL

Re: [sqlite] SQLite Site

2017-09-02 Thread Igor Korot
Hi, Are you behind firewall? Thank you. On Sep 2, 2017 8:12 AM, "Stephen Chrzanowski" wrote: > I'm sitting on a new computer at work, and was trying to get the 3.20.1 > DLL, but, the browser is just spinning its wheels. > > I'm going to see what my Drobo has at home, and

[sqlite] How to handle such situation

2017-10-04 Thread Igor Korot
Hi, list, Have a following question. I am writing an application in which I will be using transactions. At the end of the application I will close the connection. The application will verify every single call to SQLite for an error. If I start transaction, all queries were successful, but

Re: [sqlite] Best way to develop a GUI front-end

2017-11-15 Thread Igor Korot
Take a look at wx{Phoenix, Python}. It is much simpler, written in python, supports all its versions, and there demos and samples on its website - www.wxpython.org Thank you. On Wed, Nov 15, 2017 at 2:32 PM, Peter Da Silva wrote: > Tk is platform independent, so

Re: [sqlite] Best way to develop a GUI front-end

2017-11-14 Thread Igor Korot
Hi, Did you look at wxPython (or wxPhoenix)? It was recenty saw a new release.. Thank you. On Tue, Nov 14, 2017 at 3:39 PM, Peter Da Silva wrote: > On 11/14/17, 3:33 PM, "sqlite-users on behalf of Balaji Ramanathan" >

Re: [sqlite] Many ML emails going to GMail's SPAM

2017-11-22 Thread Igor Korot
Hi, Postgres very recently switched to PGLister for their ML This software switch tries to do exactly that - it tries to stay complaint with all this DMARC stuff. Here is the announcement that was posted on their wiki page: https://wiki.postgresql.org/wiki/PGLister_Announce. Since SQLite

Re: [sqlite] how into insert row into middle of table with integer primary key

2017-11-22 Thread Igor Korot
atter. Inserting the record is an implementation detail which shouldn't bother you at all. Unless you can sow us that the time required to retrieve the sorting data will SIGNIICANTLY differ in both cases. I am ready to hear arguments against this approach. ;-) Thank you. > > > On 22

Re: [sqlite] Many ML emails going to GMail's SPAM

2017-11-22 Thread Igor Korot
Hi, On Wed, Nov 22, 2017 at 10:53 AM, jungle Boogie <jungleboog...@gmail.com> wrote: > On 22 November 2017 at 07:56, Igor Korot <ikoro...@gmail.com> wrote: >> Hi, >> Postgres very recently switched to PGLister for their ML >> >> This software switch trie

Re: [sqlite] how into insert row into middle of table with integer primary key

2017-11-22 Thread Igor Korot
Hi, On Wed, Nov 22, 2017 at 2:30 PM, Shane Dev <devshan...@gmail.com> wrote: > On 22 November 2017 at 17:08, Igor Korot <ikoro...@gmail.com> wrote: > >> Hi, Shane, >> >> >> What I don't understand is why do you need to do that? >> > > Imagi

Re: [sqlite] Why Unicode is difficult

2017-12-04 Thread Igor Korot
Stephen, On Mon, Dec 4, 2017 at 1:01 PM, Stephen Chrzanowski <pontia...@gmail.com> wrote: > ... as in how 1 != "1"? No. 1000 vs 1,000 vs 1.000 vs 1,000.00 vs whatever. > > On Mon, Dec 4, 2017 at 11:07 AM, Igor Korot <ikoro...@gmail.com> wrote: > >> Hi, &

[sqlite] PRAGMA foreign_key_list

2017-11-14 Thread Igor Korot
Hi, I am curious - how hard will it be to add the constraint name to the result of this view? Thank you. ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] how into insert row into middle of table with integer primary key

2017-11-20 Thread Igor Korot
Hi, On Mon, Nov 20, 2017 at 10:12 AM, R Smith wrote: > This question pops up from time to time. > > I will show a correct query script to achieve this below, but I want to > emphasize what others have said: Data in an RDBMS has no intrinsic order, > it's all SETs, and if you

Re: [sqlite] how into insert row into middle of table with integer primary key

2017-11-21 Thread Igor Korot
Simon, On Tue, Nov 21, 2017 at 4:48 PM, Simon Slavin wrote: > > > On 21 Nov 2017, at 10:09pm, Jens Alfke wrote: > >>> On Nov 21, 2017, at 1:56 AM, R Smith wrote: >>> >>> That assumes you are not starting from an integer part (like

[sqlite] sqlite_master structure

2017-11-01 Thread Igor Korot
Hi, ALL, I see that sqlite_master have 2 fields: name and tbl_name. It looks like they have the same value in my case. Is there a scenario when those 2 are different? And what should I check for the "table name"? Thank you. ___ sqlite-users mailing

Re: [sqlite] sqlite_master structure

2017-11-01 Thread Igor Korot
Simon, On Wed, Nov 1, 2017 at 10:44 PM, Simon Slavin <slav...@bigfraud.org> wrote: > > > On 2 Nov 2017, at 3:37am, Igor Korot <ikoro...@gmail.com> wrote: > >> I see that sqlite_master have 2 fields: name and tbl_name. It looks >> like th

Re: [sqlite] Why Unicode is difficult

2017-12-04 Thread Igor Korot
Hi, On Mon, Dec 4, 2017 at 7:42 AM, Jay Kreibich wrote: > > > Next, we can talk about how dates and times are simple and straight-forward. And then the number representation... Thank you. > > -j > > > >> On Dec 4, 2017, at 7:08 AM, Simon Slavin wrote:

Re: [sqlite] Retrieving constraint name

2017-12-10 Thread Igor Korot
int name. Yes, I may try to do that in the meantime. Thank you. > > Peter > > > > > > > > > > On Sun, Dec 10, 2017 at 7:29 PM, Igor Korot <ikoro...@gmail.com> wrote: > >> Hi, >> >> On Sun, Dec 10, 2017 at 8:30 PM, Cezary H. Noweta &

Re: [sqlite] Retrieving constraint name

2017-12-10 Thread Igor Korot
Hi, On Sun, Dec 10, 2017 at 8:30 PM, Cezary H. Noweta <c...@poczta.onet.pl> wrote: > Hello, > > On 2017-12-11 01:04, Igor Korot wrote: > >> On Sun, Dec 10, 2017 at 5:01 PM, Cezary H. Noweta <c...@poczta.onet.pl> >> wrote: > > >>> On 2017-12-10

Re: [sqlite] Retrieving constraint name

2017-12-10 Thread Igor Korot
Hi, On Sun, Dec 10, 2017 at 5:01 PM, Cezary H. Noweta <c...@poczta.onet.pl> wrote: > Hello, > > On 2017-12-10 07:21, Igor Korot wrote: >> >> The CREATE TABLE statement supports the following syntax: >> >> CREATE TABLE( , CONSTRAINT FOREIGN >> KEY()

Re: [sqlite] Retrieving constraint name

2017-12-11 Thread Igor Korot
On Mon, Dec 11, 2017 at 4:48 PM, Cezary H. Noweta <c...@poczta.onet.pl> wrote: > Hello, > > On 2017-12-11 04:29, Igor Korot wrote: >> >> Thank you, but I need to keep the official SQLite code. > > Anyway, for the people who are interested in foreign key names:

[sqlite] Retrieving constraint name

2017-12-09 Thread Igor Korot
Hi, The CREATE TABLE statement supports the following syntax: CREATE TABLE( , CONSTRAINT FOREIGN KEY() REFERENCES (ref_column_list>); However, the statement "PRAGME foreign_key_list;" does not list the foreign key name ("fk_name" in the statement above). Does the info for the aforementioned

Re: [sqlite] How to create primary key from two another PK's?

2017-10-21 Thread Igor Korot
Hi, On Oct 21, 2017 5:18 AM, "csanyipal" wrote: I try to follow advices and modify my database so it is now like this: *CREATE TABLE "student" ( "idnum" TEXT NOT NULL CONSTRAINT "pk_student" PRIMARY KEY, "studentname" TEXT NOT NULL, "teachinglang" VARCHAR(2) NOT

Re: [sqlite] ALTER TABLE

2018-05-22 Thread Igor Korot
Hi, Charles, On Tue, May 22, 2018 at 2:30 PM, Charles Leifer wrote: > As a workaround, you can always rename the existing table, create the new > table with desired attributes, and do a INSERT INTO ... SELECT FROM > old_table. Then you can safely drop the old table. But the

Re: [sqlite] Check if the new table has been created

2018-06-19 Thread Igor Korot
master. Is there a different way? Thank you. > > On Tue, Jun 19, 2018, 8:26 PM Igor Korot wrote: > >> Hi, >> Is there a C API which checks if the new table has been created? >> >> Thank you. >> ___ >> sqlite-users m

[sqlite] Check if the new table has been created

2018-06-19 Thread Igor Korot
Hi, Is there a C API which checks if the new table has been created? Thank you. ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Check if the new table has been created

2018-06-19 Thread Igor Korot
Hi, Ryan, On Tue, Jun 19, 2018 at 3:22 PM, R Smith wrote: > > On 2018/06/19 8:26 PM, Igor Korot wrote: >> >> Hi, >> Is there a C API which checks if the new table has been created? > > > We could break this down into a few separate questions: > > 1 - Is

Re: [sqlite] Reset the cursor

2018-06-07 Thread Igor Korot
scia >>Sent: Tuesday, 5 June, 2018 15:35 >>To: SQLite mailing list >>Subject: Re: [sqlite] Reset the cursor >> >>> Le 5 juin 2018 à 22:47, Igor Korot a écrit : >>> >>> As a side note: is it the case for all PRAGMA's command - they can >>be &

Re: [sqlite] Reset the cursor

2018-06-07 Thread Igor Korot
l but only a Stairway to Heaven says a > lot about anticipated traffic volume. > > >>-Original Message- >>From: sqlite-users [mailto:sqlite-users- >>boun...@mailinglists.sqlite.org] On Behalf Of Igor Korot >>Sent: Thursday, 7 June, 2018 20:19 >>To

[sqlite] Reset the cursor

2018-06-03 Thread Igor Korot
Hi, All, After executing the following: int res = sqlite3_prepare_v2( ... stmt ); while( ; ; ) { res = sqlite3_step( stmt ); if( res == SQLITE_ROW ) { // process the record } else if( res == SQLITE_DONE ) break; else { // error procressing }

Re: [sqlite] Reset the cursor

2018-06-04 Thread Igor Korot
Hi, Clemens et al, On Mon, Jun 4, 2018 at 1:23 AM, Clemens Ladisch wrote: > Igor Korot wrote: >> res = sqlite3_step( stmt ); >> >> Now I'd like the cursor in the recordset of the "stmt" to go to the record 1 >> so I can process those records again. >

Re: [sqlite] Reset the cursor

2018-06-04 Thread Igor Korot
Hi, On Mon, Jun 4, 2018 at 7:54 AM, Igor Korot wrote: > Hi, Clemens et al, > > On Mon, Jun 4, 2018 at 1:23 AM, Clemens Ladisch wrote: >> Igor Korot wrote: >>> res = sqlite3_step( stmt ); >>> >>> Now I'd like the cursor in the recordset of the

Re: [sqlite] Reset the cursor

2018-06-04 Thread Igor Korot
he statement was not reset. >> >>One more thing: >> >>Is my assumption correct that sqlite3_errcode() returning 0, indicate >>there was no error? >> >>Thank you. >> >>> >>> --- >>> The fact that there's a Highway to Hell bu

Re: [sqlite] Reset the cursor

2018-06-04 Thread Igor Korot
Hi, Igor, On Mon, Jun 4, 2018 at 7:55 AM, Igor Tandetnik wrote: > On 6/4/2018 12:31 AM, Igor Korot wrote: >> >> Now I'd like the cursor in the recordset of the "stmt" to go to the record >> 1 >> so I can process those records again. >> >>

Re: [sqlite] Reset the cursor

2018-06-04 Thread Igor Korot
evious post a successful sqlite3_step doesn’t return SQLITE_OK > so > > res3 == SQLITE_ROW is never true. But SQLITE_OK != SQLITE_ROW. Thank you. > > > > > > ____ > From: sqlite-users on behalf > of Igor Korot > Sent: Monday, Jun

Re: [sqlite] Reset the cursor

2018-06-04 Thread Igor Korot
ply to Igor's post. Thank you. > > > > > From: sqlite-users on behalf > of Igor Korot > Sent: Monday, June 4, 2018 1:52:05 PM > To: SQLite mailing list > Subject: Re: [sqlite] Reset the cursor > > Hi, > > On Mon, Jun 4,

Re: [sqlite] Reset the cursor

2018-06-05 Thread Igor Korot
he second iteration. Thank you. > > > --- > The fact that there's a Highway to Hell but only a Stairway to Heaven says a > lot about anticipated traffic volume. > > >>-Original Message- >>From: sqlite-users [mailto:sqlite-users- >>boun...@mailinglists.

Re: [sqlite] Reset the cursor

2018-06-05 Thread Igor Korot
, Got SQLITE_DONE > ! > sqlite3_reset returns 0 > > which is what I would expect ... > > > > --- > The fact that there's a Highway to Hell but only a Stairway to Heaven says a > lot about anticipated traffic volume. > >>-Original Message- >>From: s

Re: [sqlite] Reset the cursor

2018-06-05 Thread Igor Korot
SQLITE_DONE. But I guess the next time it runs it just fails for some in-known reason. If that's not it - I guess I will have to give you the test case for it. Thank you and sorry for not thinking about this immediately. On Tue, Jun 5, 2018 at 6:38 AM, Igor Korot wrote: > Hi, Keith, > &g

Re: [sqlite] Reset the cursor

2018-06-05 Thread Igor Korot
Hi, Olivier, On Tue, Jun 5, 2018 at 3:15 PM, Olivier Mascia wrote: >> Le 5 juin 2018 à 18:19, Igor Korot a écrit : >> >> My query is: >> >> std::string query = "PRAGMA foreign_key_list( \"%w\" )"; >> >> Then I'm doing this: >&

Re: [sqlite] Reset the cursor

2018-06-04 Thread Igor Korot
ting under the latest SQLite source? Thank you. > > 2018-06-04 10:41:10 MinGW [D:\work] >>test > > Loop 1, no reset > 1 2 3 4 5 6 7 8 9 10 ! > sqlite3_reset returns 0 > > Loop 2, after reset > 1 2 3 4 5 6 7 8 9 10 ! > sqlite3_reset returns 0 > > > >

Re: [sqlite] Reset the cursor

2018-06-04 Thread Igor Korot
x, On Mon, Jun 4, 2018 at 10:54 AM, x wrote: > If the first loop exits with res3 == SQLITE_DONE then !result will be true > and the second loop should process exactly the same (assuming underlying data > is unchanged). I can’t see why the code below wouldn’t work although I’m > confused by

Re: [sqlite] Reset the cursor

2018-06-04 Thread Igor Korot
Keith, On Mon, Jun 4, 2018 at 12:35 PM, Keith Medcalf wrote: > > #include "sqlite3.h" > #include > > void main(int argc, char** argv) > { > sqlite3* db = 0; > sqlite3_stmt* stmt = 0; > char* rest = 0; > int rc = 0; > int value = 0; > sqlite3_open(":memory:", ); > rc

Re: [sqlite] Reset the cursor

2018-06-04 Thread Igor Korot
sqlite-users [mailto:sqlite-users- >>boun...@mailinglists.sqlite.org] On Behalf Of Igor Korot >>Sent: Monday, 4 June, 2018 11:50 >>To: SQLite mailing list >>Subject: Re: [sqlite] Reset the cursor >> >>Keith, >> >>On Mon, Jun 4, 2018 at 12:35 PM, Keith Med

Re: [sqlite] Check if the new table has been created

2018-06-20 Thread Igor Korot
gt; On 21/06/2018, at 12:44 PM, Igor Korot wrote: >> >> Hi, guys, >> I put in this code: >> >>if( sqlite3_prepare_v2( m_db, "PRAGMA >> schema_version", NULL, , NULL ) == SQLITE_OK ) >>

Re: [sqlite] Check if the new table has been created

2018-06-20 Thread Igor Korot
Hi, guys, I put in this code: if( sqlite3_prepare_v2( m_db, "PRAGMA schema_version", NULL, , NULL ) == SQLITE_OK ) { if( ( res = sqlite3_step( stmt ) ) == SQLITE_OK ) { m_schema =

Re: [sqlite] Check if the new table has been created

2018-06-20 Thread Igor Korot
Richard, On Wed, Jun 20, 2018 at 8:17 PM, Richard Hipp wrote: > On 6/20/18, Igor Korot wrote: >> if( ( res = sqlite3_step( stmt ) ) == SQLITE_OK ) > > sqlite3_step() returns SQLITE_ROW when it has data, not SQLITE_OK. But SQLITE_ROW value is not 21 - its

Re: [sqlite] Check if the new table has been created

2018-06-19 Thread Igor Korot
Hi, guys, On Tue, Jun 19, 2018 at 4:37 PM, Igor Korot wrote: > Hi, Ryan, > > On Tue, Jun 19, 2018 at 3:22 PM, R Smith wrote: >> >> On 2018/06/19 8:26 PM, Igor Korot wrote: >>> >>> Hi, >>> Is there a C API which checks if the new table has

Re: [sqlite] column types and constraints

2018-06-30 Thread Igor Korot
Hi, ALL, I am not sure what are we talking about here and is discussed. Just like on the paper the hard drive is storing the characters. It is for us (humans, developers) to interpret those characters as a TEXT, numeric value (be it INTEGER or FLOAT/DOUBLE) or some binary data. As long as the

Re: [sqlite] unknown type name 'sqlite_int64'

2018-04-30 Thread Igor Korot
Hi, On Mon, Apr 30, 2018 at 6:30 PM, jungle Boogie wrote: > Hi All, > > What's happening here? > > $ cc --version > OpenBSD clang version 6.0.0 (tags/RELEASE_600/final) (based on LLVM 6.0.0) > Target: aarch64-unknown-openbsd6.3 > Thread model: posix > > ARM64 bit on a

Re: [sqlite] unknown type name 'sqlite_int64'

2018-04-30 Thread Igor Korot
Hi, On Mon, Apr 30, 2018 at 7:31 PM, jungle Boogie <jungleboog...@gmail.com> wrote: > On 5:20PM, Mon, Apr 30, 2018 Igor Korot <ikoro...@gmail.com> wrote: >> >> Hi, >> >> On Mon, Apr 30, 2018 at 6:30 PM, jungle Boogie <jungleboog...@gmail.com> > wro

Re: [sqlite] very sqlite3 noobie error

2017-10-22 Thread Igor Korot
Hi, John, On Sun, Oct 22, 2017 at 9:59 PM, John R. Sowden wrote: > Since I am trying to learn sqlite3 (unlearning foxpro) I find that python is > the simpleist language, wfich allows me to focus on sqlite, I amtrying the > =guide just sent to the list. > > I am

<    1   2   3   4   5   >