Re: [sqlite] how to use sqlite from classic ASP with no installation...

2016-06-28 Thread Olaf Schmidt
Am 24.06.2016 um 10:48 schrieb Dominique Lagree: I have a classic ASP application running on Windows / IIS to provide that would use an sqlite database. ... How can we access to sqlite through an interface (oledb ?) that could be called from classic ASP vbscript and could run just from a copy

Re: [sqlite] UNIQUE constraint violation

2016-06-28 Thread Joe Pasquariello
On 6/28/2016 4:52 PM, Simon Slavin wrote: On 28 Jun 2016, at 11:22pm, Joe Pasquariello wrote: select rowid, device, hex(device), localtime, udatetime from eventlog where device like '%M14' and udatetime=1415000934 rowiddevicehex(device)localtimeudatetime

[sqlite] x64 binary

2016-06-28 Thread BOSECKER Nancy
Hi, I have a very basic problem, maybe someone can help. I'm trying to use sqlite3.dll in an x64 application (VS 2008). So, I downloaded the x64 zip from the SQLite download page, unzipped it. I put the .dll, .lib, and .def files in my project's directory. I added the .lib to the Linker->Input

Re: [sqlite] UNIQUE constraint violation

2016-06-28 Thread Simon Slavin
If you need to temporarily violate checks in order to rearrange your schema, I draw your attention to these two: Obviously, once you're done rearranging/importing you

Re: [sqlite] UNIQUE constraint violation

2016-06-28 Thread J Decker
Duplication can also result as part of the - in process - moving of rows. To change the order of [1,2,3,4] to [1,3,2,4] there is(can be) a state that is [1,2,2,4] before the second part that sets three back into 2. This is a point where NULL can be useful to make the transition [1,2,NULL,4]

Re: [sqlite] UNIQUE constraint violation

2016-06-28 Thread Simon Slavin
On 28 Jun 2016, at 11:22pm, Joe Pasquariello wrote: > select rowid, device, hex(device), localtime, udatetime > from eventlog where device like '%M14' and udatetime=1415000934 > > rowiddevicehex(device)localtimeudatetime > 18031M144D31342014-11-03

Re: [sqlite] UNIQUE constraint violation

2016-06-28 Thread Joe Pasquariello
On 6/28/2016 3:05 PM, Simon Slavin wrote: SELECT device,HEX(device) FROM myTable WHERE Thanks, Simon. Now it's getting really strange. Two queries and their results are shown below. The value of "device" seems to be the same in both rows. One query includes the field "localtime" and the

Re: [sqlite] UNIQUE constraint violation

2016-06-28 Thread Joe Pasquariello
On 6/28/2016 2:35 PM, R Smith wrote: On 2016/06/28 11:21 PM, R Smith wrote: CREATE TABLE t(A TEXT COLLATE NOCASE, BTEXT COLLATE NOCASE); Correction: I meant to paste that line below saying it is what you need to fix the grouping, and added it to the script in stead. The original meant to

Re: [sqlite] UNIQUE constraint violation

2016-06-28 Thread Simon Slavin
On 28 Jun 2016, at 11:03pm, Joe Pasquariello wrote: > Somehow, the two "device" values shown in the table below are not the same, > and I have no idea why. SELECT device,HEX(device) FROM myTable WHERE ... Simon. ___ sqlite-users

Re: [sqlite] UNIQUE constraint violation

2016-06-28 Thread R Smith
On 2016/06/28 11:21 PM, R Smith wrote: CREATE TABLE t(A TEXT COLLATE NOCASE, BTEXT COLLATE NOCASE); Correction: I meant to paste that line below saying it is what you need to fix the grouping, and added it to the script in stead. The original meant to be without the NOCASE collations.

Re: [sqlite] UNIQUE constraint violation

2016-06-28 Thread R Smith
On 2016/06/28 10:52 PM, j...@fenway.com wrote: Thank you, Ryan. I'm embarassed to say I don't know how to reply to your response. When I posted my original question, I simply sent email to the mailing list. I viewed your response on Nabble, but it doesn't seem to allow me to reply. How can I

[sqlite] UNIQUE constraint violation

2016-06-28 Thread Joe Pasquariello
Firstly, the Index i_udatetime is Superfluous, you can remove it for some efficiency points. (The Unique constraint already offers an Index with udatetime as the left-most or main Index). All I can still suggest or ask is: Are you sure there are no duplicates? The correct SQL to check would be:

Re: [sqlite] UNIQUE constraint violation

2016-06-28 Thread R Smith
Additionally - You should add NOT NULL to the PRIMARY KEY constraint too, since a backwards-compatible peculiarity in SQLite allows the PK to have NULL values if not explicitly disallowed. BEGIN TRANSACTION; DROP TABLE IF EXISTS TempEventLog; ALTER TABLE EventLog RENAME TO TempEventLog;

Re: [sqlite] UNIQUE constraint violation

2016-06-28 Thread R Smith
Firstly, the Index i_udatetime is Superfluous, you can remove it for some efficiency points. (The Unique constraint already offers an Index with udatetime as the left-most or main Index). All I can still suggest or ask is: Are you sure there are no duplicates? The correct SQL to check would

[sqlite] UNIQUE constraint violation

2016-06-28 Thread Joe Pasquariello
Hello, I'm a novice user of Sqlite, and could use some help. The code below is intended to update a simple table to a new format. The changes include reordering columns, dropping one column, and adding a new "status" column (which is always 0). A constraint violation is being reported on

Re: [sqlite] How to use "cursors" in c#

2016-06-28 Thread Bernard Ertl
> ... If your application requires concurrent network access, you should be > using either a network client/server DBMS or programming your own > Client/Server pair with the server process calling the SQLite API to modify > the db file held on the servers' local filesystem. ... There is an

Re: [sqlite] How to use "cursors" in c#

2016-06-28 Thread Drago, William @ CSG - NARDA-MITEQ
> -Original Message- > From: sqlite-users-boun...@mailinglists.sqlite.org [mailto:sqlite-users- > boun...@mailinglists.sqlite.org] On Behalf Of R Smith > > As an aside - I've always prescribed generating your own ID's. There is no > requirement for using AUTOINCREMENT in any DB - It's a

Re: [sqlite] Locking semantics are broken?

2016-06-28 Thread Stephen Chrzanowski
In Mr Smiths examples, one statement effect is a direct result of an action you (subjectively speaking) knowingly did, or did not do, to the car. You did not fuel the car. You did take the wheels off. There by, your car is essentially a hunk of metal taking up space. It doesn't function as

Re: [sqlite] Locking semantics are broken?

2016-06-28 Thread R Smith
On 2016/06/28 5:46 PM, John Found wrote: On Wed, 29 Jun 2016 01:03:28 +1000 "dandl" wrote: But if everything is configured right and working right and nothing bad happens then it is highly reliable over very large volumes of transactions. For me, this is a clear definition

Re: [sqlite] How to use "cursors" in c#

2016-06-28 Thread Simon Slavin
On 28 Jun 2016, at 4:56pm, R Smith wrote: > I am not clear on what happens for INSERT OR REPLACE results when a row gets > updated in stead of inserted, but the documentation should have details. In SQLite, the REPLACE operation really does delete the original and insert a

Re: [sqlite] How to use "cursors" in c#

2016-06-28 Thread R Smith
On 2016/06/28 5:10 PM, Drago, William @ CSG - NARDA-MITEQ wrote: Ah, good thoughts. My thinking was that the last row id wouldn't be valid until the transaction was successful. But I guess if the transaction is not successful it doesn't matter what the last row is because now there are

Re: [sqlite] Locking semantics are broken?

2016-06-28 Thread John Found
On Wed, 29 Jun 2016 01:03:28 +1000 "dandl" wrote: > But if everything is configured right and working right and nothing bad > happens then it is highly reliable over very large volumes of transactions. For me, this is a clear definition of the term "not reliable". Isn't it? --

Re: [sqlite] SQlite database corrupt , PHP and multithread C program accessing same database

2016-06-28 Thread Simon Slavin
On 28 Jun 2016, at 4:24pm, mon siong wrote: > Yes , I always do this check before i proceed next step . if(rc != > SQLITE_OK){ } Very good. > I just crash my database with 1 thread keep reading , another thread keep > inserting . Here is how i open the DB connection .

Re: [sqlite] SQlite database corrupt , PHP and multithread C program accessing same database

2016-06-28 Thread mon siong
Yes , I always do this check before i proceed next step .  if(rc != SQLITE_OK){ } I just crash my database with 1 thread keep reading , another thread keep inserting . Here is how i open the DB connection . rc = sqlite3_open_v2(DEFAULT_FAILTS_DB,

Re: [sqlite] How to use "cursors" in c#

2016-06-28 Thread Drago, William @ CSG - NARDA-MITEQ
> -Original Message- > From: sqlite-users-boun...@mailinglists.sqlite.org [mailto:sqlite-users- > boun...@mailinglists.sqlite.org] On Behalf Of R Smith > Sent: Tuesday, June 28, 2016 7:33 AM > To: sqlite-users@mailinglists.sqlite.org > Subject: Re: [sqlite] How to use "cursors" in c# > > >

Re: [sqlite] Locking semantics are broken?

2016-06-28 Thread dandl
Fair comment. We have seen problems: 1. In all versions of Windows based on the 95 kernel, and especially Windows ME (but not the NT kernel since 3.5) 2. At any time if the network infrastructure is unreliable (too many errors or retries) 3. At any time if a client machine misbehaves eg crashes

Re: [sqlite] How to use "cursors" in c#

2016-06-28 Thread R Smith
On 2016/06/28 12:17 PM, William Drago wrote: I am programming in c# and I have to insert into a .sqlite file a new row and get back the id of this last inserted row. This file "unfortunately" might be located on an internal network and other users might try to add other rows in the

Re: [sqlite] How to use "cursors" in c#

2016-06-28 Thread William Drago
I am programming in c# and I have to insert into a .sqlite file a new row and get back the id of this last inserted row. This file "unfortunately" might be located on an internal network and other users might try to add other rows in the meantime. I can't help with your locking issues, but

Re: [sqlite] Locking semantics are broken?

2016-06-28 Thread Donald Shepherd
On Tue, 28 Jun 2016 at 19:17 Rowan Worth wrote: > On 28 June 2016 at 16:07, dandl wrote: > > > > Do not use SQLite for concurrent access over a network connection. > > Locking > > > semantics are broken for most network filesystems, so you will have > > >

Re: [sqlite] Locking semantics are broken?

2016-06-28 Thread Simon Slavin
On 28 Jun 2016, at 9:07am, dandl wrote: >> Do not use SQLite for concurrent access over a network connection. Locking >> semantics are broken for most network filesystems, so you will have >> corruption issues that are no fault of SQLite. > > I have seen this comment made more

Re: [sqlite] Locking semantics are broken?

2016-06-28 Thread Rowan Worth
On 28 June 2016 at 16:07, dandl wrote: > > Do not use SQLite for concurrent access over a network connection. > Locking > > semantics are broken for most network filesystems, so you will have > > corruption issues that are no fault of SQLite. > > I have seen this comment made

Re: [sqlite] Locking semantics are broken?

2016-06-28 Thread Clemens Ladisch
dandl wrote: >> Do not use SQLite for concurrent access over a network connection. Locking >> semantics are broken for most network filesystems, so you will have >> corruption issues that are no fault of SQLite. > > I have seen this comment made more than once on this list. Is there any > reliable

[sqlite] Locking semantics are broken?

2016-06-28 Thread dandl
> Do not use SQLite for concurrent access over a network connection. Locking > semantics are broken for most network filesystems, so you will have > corruption issues that are no fault of SQLite. I have seen this comment made more than once on this list. Is there any reliable evidence to support

Re: [sqlite] How to use "cursors" in c#

2016-06-28 Thread Jean-Christophe Deschamps
As another further response and if you use automatic INTEGER PRIMARY KEY IDs, then the sqlite3_last_insert_rowid() call will tell you unambiguously, provided the call is made within an explicit transaction initiated before the insert. As a further response, regarding that Martina said "insert

Re: [sqlite] How to use "cursors" in c#

2016-06-28 Thread Darren Duncan
As a further response, regarding that Martina said "insert ... new row and get back the id of this last inserted row", I believe that this likely reflects a poor design. Wherever possible, every field of a row to insert including its identifiers should be known BEFORE inserting the row, and

Re: [sqlite] How to use "cursors" in c#

2016-06-28 Thread Hick Gunter
Do not use SQLite for concurrent access over a network connection. Locking semantics are broken for most network filesystems, so you will have corruption issues that are no fault of SQLite. If your application requires concurrent network access, you should be using either a network