Re: [sqlite] DBMS Normalization Query

2019-10-03 Thread Chris Locke
Short answer. Duplicate data in a database is bad. Take school departments. For each teacher, do you put "History", "Chemistry", "Biology" for their department? What happens if someone enters "Bioolgy" instead? So for your point #1, "as soon as duplicate data is possible". Maybe not for

Re: [sqlite] 3.29.0 .recover command

2019-08-06 Thread Chris Locke
> I got foreign key constraint failures I don't know why one would work and one would fail, but usually, this occurs when you insert a record which has foreign keys to another table, but that table hasn't been imported yet. The workaround is usually to ensure all the 'lookup' tables are done

Re: [sqlite] Quirks of SQLite. Was: Version 3.29.0

2019-07-11 Thread Chris Locke
Typos \ suggested amendments to quirks.html Section 2 "When ever comparing SQLite to other SQL database engines" When ever should be one word. "Whenever comparing SQLite to other SQL database engines" "An application interact with the database engine" should be, "An application *interacts* with

Re: [sqlite] round function inconsistent

2019-05-24 Thread Chris Locke
> Yours is clearly incorrect lol. "Your software gives a different result to the one I expect, therefore its wrong." You are aware that your first example (3.255) probably isn't being stored internally as a single. Just because computers work outside your understanding doesn't make them

Re: [sqlite] Series of statements results in a malformed database disk image

2019-05-09 Thread Chris Locke
Edit: HOWEVER, just ran an integrity check, and that did fail. "wrong # of entries in index sqlite_autoindex_t1_1" On Thu, May 9, 2019 at 3:52 PM Chris Locke wrote: > Are you using a new database when you create your table, or using an > existing database? > Are you wr

Re: [sqlite] Series of statements results in a malformed database disk image

2019-05-09 Thread Chris Locke
Are you using a new database when you create your table, or using an existing database? Are you writing your database locally? What operating system / sqlite version are you using? The above test works for me... > Execution finished without errors. > Result: 1 rows returned in 62ms > At line

Re: [sqlite] Unexpected or wrong result and no warning/error, bug?

2019-04-12 Thread Chris Locke
> create table t(s varchar(5)); Also note that SQLite doesn't 'understand' varchar (it uses text) and it doesn't limit the entry to 5 characters. This doesn't help your issue directly, but does highlight that you've not read the SQLite documentation, and aren't creating tables properly. On Fri,

Re: [sqlite] Remove row to insert new one on a full database

2019-04-05 Thread Chris Locke
Arthur - are you running SQLite in parallel runs? If you access the database file using the sqlite3 command-line tool, and try to execute the same SQL commands, do you get the same error ? SQLite makes a temporary 'journal' file while it's working. I think that, on your platform, by default it

Re: [sqlite] Remove row to insert new one on a full database

2019-04-04 Thread Chris Locke
> When the database is full What do you mean by a full database? Do you mean when the operating system has run out of disk space? A SQLite database can hold millions of rows, so technically, a database cannot be 'full'. It would be easier explaining the full issue and what you consider the

[sqlite] Typo - https://www.sqlite.org/see/doc/trunk/www/index.wiki

2019-03-13 Thread Chris Locke
On the page https://www.sqlite.org/see/doc/trunk/www/index.wiki in the 'key links' section, there is a link to 'Files in the lastest release of SEE'. This should be 'latest' and not 'lastest'. Thanks, Chris ___ sqlite-users mailing list

[sqlite] Number of open connections

2019-03-12 Thread Chris Locke
Does SQLite keep a count of the number of current open connections to the database? On the DB4S mailing list, there is an enquiry ( https://github.com/sqlitebrowser/sqlitebrowser/issues/1798) about encryption failing due to the database being open. Was wondering whether a PRAGMA or function

Re: [sqlite] Number of open connections

2019-03-12 Thread Chris Locke
Thanks Richard for the reply. Appreciated. On Tue, Mar 12, 2019 at 2:49 AM Richard Hipp wrote: > On 3/11/19, Chris Locke wrote: > > Does SQLite keep a count of the number of current open connections to the > > database? > > No. > > SQLite can find out if some other

[sqlite] Number of open connections

2019-03-11 Thread Chris Locke
Does SQLite keep a count of the number of current open connections to the database? On the DB4S mailing list, there is an enquiry ( https://github.com/sqlitebrowser/sqlitebrowser/issues/1798) about encryption failing due to the database being open. Was wondering whether a PRAGMA or function

Re: [sqlite] [EXTERNAL] Integration with las version of SQLite

2019-03-06 Thread Chris Locke
I fear the OP is referring to DB Browser for SQLite. This recently released v3.11.1. @desarrollo - I would suggest contacting the DB Browser for SQLite developers at this address: https://github.com/sqlitebrowser/sqlitebrowser/issues Thanks, Chris On Wed, Mar 6, 2019 at 3:47 PM Hick Gunter

Re: [sqlite] Safe (atomic) db file snapshot and update

2019-03-06 Thread Chris Locke
> Multiple processes write to foo.db. What method of journaling do you use? WAL? > Multiple processes read foo.db (no writes at all). Do they open a connection, read, then close the connection, or do you open a connection, read, read, read, read, until the process is terminated, THEN close the

Re: [sqlite] Site search bug - https://sqlite.org/

2019-02-27 Thread Chris Locke
The link you quote mentions SQLite 3.24 though... ? Thanks, Chris On Wed, Feb 27, 2019 at 12:44 PM niki wrote: > This link demonstrates the problem: > > https://sqlite.org/search?s=c=3.24 > > Best regards, > > Niki > > ___ > sqlite-users mailing

[sqlite] Cannot Modify Table if Part of a View

2019-02-22 Thread Chris Locke
This issue was found via DB Browser for SQLite, but relates to SQLite, not DB Browser for SQLite, so please bear with me If a table is part of a view, then SQLite complains that "Error: error in view view1: no such table: main.table11" The link to the full issue is here:

Re: [sqlite] Vacuum into

2019-02-08 Thread Chris Locke
If you renamed file1.db to file1.bak, opened file1.bak, vacuum into file1.db, close file1.bak, you have a backup pre-vacuum (just in case...) and 'streamlines' the process some-what. Obviously, you'd have to rename the file back again if the vacuum failed (out of disk space, etc) Just a

Re: [sqlite] SQLite slow when lots of tables

2019-01-29 Thread Chris Locke
Ryan Smith has already covered this scenario. "And to add to the slew of "Few-tables-many-rows rather than Many-tables-few-rows" solutions offered, one thing to note: After a single table contains a few million rows, INSERTing will become slightly slower, but the difference will still be

Re: [sqlite] SQLite slow when lots of tables

2019-01-29 Thread Chris Locke
I don't know - that's why I asked. Thanks for the clarification. On Mon, Jan 28, 2019 at 10:10 PM Warren Young wrote: > On Jan 28, 2019, at 2:44 PM, Chris Locke wrote: > > > >> The table name should not be meaningful to your application; nothing in > >> your ap

Re: [sqlite] SQLite slow when lots of tables

2019-01-28 Thread Chris Locke
> The table name should not be meaningful to your application; nothing in > your application should conjure up a table name. I can't get my head around this advice. Is this just for this occasion, or for every application? What if I'm writing a customer address book? Am I allowed a table

Re: [sqlite] SQLite slow when lots of tables

2019-01-28 Thread Chris Locke
Why do you need to create a new table each time? Its easier to create a relational database. This means create one main table that might (for example) have a 'tableID' field, which points to just one other table. This means you only need two tables. Not 20,000+ Just an idea. Depends on what

Re: [sqlite] Building SQLite DLL with Visual Studio 2015

2019-01-21 Thread Chris Locke
Just curious as to why you wouldn't choose option #2 - as that's what I use with my VB .NET applications, which work quite well. Just distribute the .exe, then the two SQLite DLLs (well, three technically, as there are two versions of the interop.dll) Thanks, Chris On Mon, Jan 21, 2019 at 4:19

Re: [sqlite] Sample Employee database ported to SQLite from MySQL

2018-12-20 Thread Chris Locke
> Just because something doesn't have to be calculated, means that it has to be stored as text. Sorry - forgot a 'doesn't'. Just because something doesn't have to be calculated, doesn't mean that it has to be stored as text. On Thu, Dec 20, 2018 at 3:42 PM Chris Locke wrote: > Just b

Re: [sqlite] Sample Employee database ported to SQLite from MySQL

2018-12-20 Thread Chris Locke
19 Dec 2018 10:55:11 + > Chris Locke wrote: > > > Fields with '_no' are read as 'number' and so should be a number. > > OK, that doesn't always work for 'telephone_no' (they usually start > > with a 0 > > Lots of numbers are labels that aren't meant to be calculate

Re: [sqlite] SQLite Application Question

2018-12-20 Thread Chris Locke
uery takes milliseconds and a database can hold a whole manner of settings, configurations, etc. File size is small and efficient too. Thanks, Chris On Thu, Dec 20, 2018 at 9:05 AM Roger Schlueter wrote: > On 12/19/2018 23:01, Chris Locke wrote: > > What application are you using to build you

Re: [sqlite] SQLite Application Question

2018-12-19 Thread Chris Locke
What application are you using to build your application? You mentioned Visual Studio, so .NET? If so, are you using the SQLite library from system.data.sqlite.org? Are you using c# or vb? My settings table is a lot simpler. id, setting and value. 3 columns. Possibly 4, adding a 'code'

Re: [sqlite] Sample Employee database ported to SQLite from MySQL

2018-12-19 Thread Chris Locke
ies ( > > emp_no INT NOT NULL, > > salary INT NOT NULL, > > from_date DATENOT NULL, > > to_date DATENOT NULL, > > PRIMARY KEY (emp_no, from_date) > > ) without rowid; > > C

Re: [sqlite] Sample Employee database ported to SQLite from MySQL

2018-12-19 Thread Chris Locke
The scheme (for me) is like nails on a chalkboard. 'dept_no' but defined as a 'CHAR', then 'emp_no' as an INT. Fields with '_no' are read as 'number' and so should be a number. OK, that doesn't always work for 'telephone_no' (they usually start with a 0 ... well, they do in the UK where I am...)

Re: [sqlite] HELP!

2018-11-13 Thread Chris Locke
> it is almost guaranteed to corrupt the database file if more than one connection tries to access it at the same time. I understand the risks and reasons, but have had numerous databases on our Windows network accessed by 20+ users throughout the day without issue. Thanks, Chris On Sun, Nov

Re: [sqlite] Displaying row count

2018-10-31 Thread Chris Locke
> that will display a row number when outputting results? Is this for your schema, or a 'general-could-be-anything' schema? If your own, any reason why you don't use the rowid or _rowid_ columns? They provide a unique reference for each row in a table. Thanks, Chris On Wed, Oct 31, 2018 at

Re: [sqlite] Regarding CoC

2018-10-24 Thread Chris Locke
> On the other hand, I am open to suggestions on how to express > those values in a way that modern twitter-ites can better understand Probably via selfie, with a duckface, together with your evening meal in the background. On Mon, Oct 22, 2018 at 4:30 PM Richard Hipp wrote: > On 10/22/18,

Re: [sqlite] error message: [FireDAC][Phys][SQLite] Database is locked

2018-10-15 Thread Chris Locke
It was purely a 'gotcha' that has caught me out before - a journal file lingers and locks the system. On Mon, Oct 15, 2018 at 4:03 AM Rowan Worth wrote: > On Sat, 13 Oct 2018 at 00:21, Chris Locke > wrote: > > > > Database is locked > > > > Close your applicatio

Re: [sqlite] error message: [FireDAC][Phys][SQLite] Database is locked

2018-10-12 Thread Chris Locke
> Database is locked Close your application. Is there a xxx-journal file in the same directory as the database? (where xxx is the name of the database) Try deleting this file. Thanks, Chris On Fri, Oct 12, 2018 at 4:54 PM Thomas Kurz wrote: > >> Could the problem arise due to filesystem

Re: [sqlite] Error when reading from pre-populated SQLite database in Ionic project

2018-09-05 Thread Chris Locke
When SQLite creates an empty .db file, which directory is it in? With all your tweaking, etc, is the new database always in the same directory? Thanks, Chris On Wed, Sep 5, 2018 at 3:23 PM Robert Helmick wrote: > I'm receiving an error when I try to read from a pre-populated SQLite >

Re: [sqlite] PRAGMA case_sensitive_like

2018-08-16 Thread Chris Locke
*case_sensitive_like` should rteturn > the value; a pragma without a value. > there's also a pragma pragma_list which (if compiled in) will return all > available pragmas > > On Thu, Aug 16, 2018 at 6:16 AM Chris Locke > wrote: > > > While the pragma *case_sensitive_like *c

[sqlite] PRAGMA case_sensitive_like

2018-08-16 Thread Chris Locke
While the pragma *case_sensitive_like *can be set, there doesn't seem to be a way to read it. Is there a reason for it being write only? A hacky workaround is to use the SQL, "select 'x' like 'X' ", but is there a better way? ___ sqlite-users mailing

Re: [sqlite] BUG REPORT

2018-08-15 Thread Chris Locke
> I am using a query to check a date field between a range of dates Can you provide example values of the date in your database? Are you storing the EXACT date (eg, '2018-02-01 12:21'), or just the date? > When running this with the ODBC driver it fails to return all the appropriate record in

Re: [sqlite] Using Chinook

2018-08-13 Thread Chris Locke
> I am just starting to learn SQLite Just a nod to check out (if you haven't already) the tutorials on w3schools. https://www.w3schools.com/sql/default.asp Not only do they clearly explain various SQL commands, but you can try them out 'live' on their website using sample databases - nothing to

Re: [sqlite] Using Chinook

2018-08-13 Thread Chris Locke
When using directories with spaces, its better (or necessary) to include the whole directory in double quotes. Therefore, try entering this: sqlite3 "e:\VB Resources\SQLite\chinook.db" No problems with being a novice - everyone was a novice once. Thanks, Chris On Mon, Aug 13, 2018 at 1:15 PM

Re: [sqlite] Using Chinook

2018-08-13 Thread Chris Locke
> to include the whole directory Sorry, I meant the whole filename. On Mon, Aug 13, 2018 at 1:28 PM Chris Locke wrote: > When using directories with spaces, its better (or necessary) to include > the whole directory in double quotes. Therefore, try entering this: > sqlite3 &quo

Re: [sqlite] Very, very slow commits - Possibly solved

2018-07-31 Thread Chris Locke
I've been following this thread with interest, but this just doesn't make sense... > Logically speaking SQLite shouldn't notice the difference in row order, but things do slow down, > even with analyse. Are you accessing each row via its ID? Even so, that should still be indexed. I thought you

Re: [sqlite] Full text serch - Matching all except chosen

2018-07-31 Thread Chris Locke
If you want anything except "cat" then you can use the less than and greater than comparison - <> . select * from table where field <> 'cat' This equates to "select all records where the value in the field column is less than and is greater than 'cat'. SQL allows you to search for less than and

Re: [sqlite] Use with Visual Studio

2018-07-08 Thread Chris Locke
I use system.data.sqlite.dll (taken from here: https://system.data.sqlite.org/index.html/doc/trunk/www/downloads.wiki) with no problems in both VS 2017 Professional and VS 2017 Community. Thanks, Chris On Mon, Jul 9, 2018 at 2:47 AM Roger Schlueter wrote: > I am considering using the .net

Re: [sqlite] Resources for learning SQLite

2018-03-29 Thread Chris Locke
I'm a VB.Net developer (so don't hate me...) but use SQLite quite extensively at work - works really well (well, obviously...) If you know SQL Server, then SQLite isn't that miuch different, and the class wrappers I use are identical, apart from the connection strings, which I could pass on. The

Re: [sqlite] How many AUTOINCREMENT tables are in your schema?

2018-03-22 Thread Chris Locke
ul > www.sandersonforensics.com > skype: r3scue193 > twitter: @sandersonforens > Tel +44 (0)1326 572786 > http://sandersonforensics.com/forum/content.php?195-SQLite- > Forensic-Toolkit > -Forensic Toolkit for SQLite > email from a work address for a fully functional

Re: [sqlite] How many AUTOINCREMENT tables are in your schema?

2018-03-20 Thread Chris Locke
> some people seem to think that an int primary key can be auto incrementing, it can't But it works in the same way sort of. Its auto incrementing, with the caveat that if the last row is deleted, the previous number will be used again. Depending on the database schema, this may or may

Re: [sqlite] How many AUTOINCREMENT tables are in your schema?

2018-03-16 Thread Chris Locke
0, across approx 20 databases, ranging from small 3 table schemas, to a couple of ERP systems using 120+ tables. Thanks, Chris On Fri, Mar 16, 2018 at 4:09 PM, R Smith wrote: > Across 8 production systems and about 120 SQLite DBs for us - Not a single > AUTOINCREMENT -

Re: [sqlite] BF Interpreter

2018-03-01 Thread Chris Locke
"Thats the beauty of it. It doesn't *do* anything." ;) On Thu, Mar 1, 2018 at 6:55 AM, Gary Briggs wrote: > Thanks to the help the other day with the strange concatentation result. > > I was referring to a BF interpreter I was working on, in pure SQLite SQL. > Well,

Re: [sqlite] Possible bug when adding "on delete cascade" via DB Browser for SQLite

2018-01-13 Thread Chris Locke
DB Browser for SQLite is a third party product which just uses SQLite. Any support issues should be directed to their gitHub support page. https://github.com/sqlitebrowser/sqlitebrowser/issues To confirm whether its an issue in DB Browser for SQLite or SQLite itself, you can 'reproduce' the

Re: [sqlite] Modify the sqlite database with DB Browser to update a new field

2017-12-24 Thread Chris Locke
I would suspect this is "DB Browser for SQLite" application. It has an 'execute SQL' tab, so the raw code can be directly entered, or the table modified through a gui. It's pretty straightforward to use, and had a wiki on its support pages. This isn't the place to guide you though, but it has a

Re: [sqlite] Importing Text to Create a Table

2017-12-22 Thread Chris Locke
What operating system are you using, and what software are you using to do the import? What specificially are you trying to import? If you perform a sequence of 'insert' statements, then that can be time consuming - its better to incorporate them into one 'transaction' - sqlite bundles the

Re: [sqlite] Error code 14 for the Journal file

2017-12-04 Thread Chris Locke
The 'scary bit' here is the device not functioning. > A device attached to the system is not functioning. Is the database/journal on the same/local PC or on a network? Chris On Mon, Dec 4, 2017 at 4:27 PM, Simon Slavin wrote: > > > On 4 Dec 2017, at 9:31am, Tilak

Re: [sqlite] Article on AUTOINC vs. UUIDs

2017-11-30 Thread Chris Locke
> if your systems are set up in a sane way, the MAC address alone would prevent collisions, no? > And on the same system, are collisions even possible? Google says "In the case of standard version 1 and 2 UUIDsusing unique MAC addresses from network cards, collisions can occur only when an

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

2017-11-22 Thread Chris Locke
> Why do I want store ID numbers > whose values may change? Why not. Because that's not what the row id column is for. Not strictly. That's why it's called 'id' - it's an identification field. You can't (shouldn't) be using it for other means. A database requirement later might need that column

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

2017-11-16 Thread Chris Locke
> For now, I am going to start > with a windows forms application in vb.net or forms in OpenOffice. I'd install SharpDevelop ( http://www.icsharpcode.net/opensource/sd/Default.aspx). Download v4.4 if you plan on using VB.Net, as the newer v5 doesn't support VB - only C#. SharpDevelop is a 15 MB

Re: [sqlite] BedrockDB interview on Floss Weekly

2017-10-27 Thread Chris Locke
>> run SQL and avoid the problems (mainly slowness) that SQLite would >> have in this situation? >> > > and > > Chris Locke wrote: > My work environment is mainly Windows servers/users. SQLite 'works' but is > obviously unsupported (file locking, etc). > Could

Re: [sqlite] BedrockDB interview on Floss Weekly

2017-10-27 Thread Chris Locke
My work environment is mainly Windows servers/users. SQLite 'works' but is obviously unsupported (file locking, etc). Could BedrockDb help in this area? Sounds like it works 'locally' but 'networkably' (is that a word?!) Couldn't find any Windows-friendly builds or guides. Even assuming it

Re: [sqlite] Fwd: Problem on Windows 10 machines

2017-09-07 Thread Chris Locke
I'd suggest running the Microsoft Process Monitor https://docs.microsoft.com/en-us/sysinternals/downloads/procmon When your application crashes, this will show the files it tried to access before the crash. It might point to a dependancy missing. Have you 'installed' SQLite on your Win 10

Re: [sqlite] Comparing rows

2017-08-22 Thread Chris Locke
> I prefer using the PortableApps SQLite browser for other things as you can have tabbed SQL queries but it doesn't have the DATETIME data type Date and Time *Datatype*. *SQLite* does not have a storage *class* set aside for storing dates and/or times. Instead, the built-in Date And Time

Re: [sqlite] Sqlite problem with opening database

2017-07-06 Thread Chris Locke
This is actually answered on the system.data.sqlite download page. https://system.data.sqlite.org/index.html/doc/trunk/www/downloads.wiki Scroll down to the section, "Using Native Library Pre-Loading". For some reason (?) on Chrome the text is about 30pt, so you shouldn't be able to miss it.

Re: [sqlite] Could not load file or assembly error

2017-06-23 Thread Chris Locke
I'd recommend the system.data.sqite.dll wrapper http://system.data.sqlite.org/index.html/doc/trunk/www/index.wiki This is a .Net component which works very well with SQLite databases.There are a plethora of downloads, which can seem daunting. Depending on your .Net flavour you're working with (I

Re: [sqlite] Error message on insert

2017-06-19 Thread Chris Locke
insert into filters (absid, filter_name, enabled, filter_order) values (null, 'Untitled filter', 0, ((select max(filter_order) from filters)+1) On Mon, Jun 19, 2017 at 11:46 AM, Tim Streater wrote: > I want to insert a new row in my table, and while doing so setting a >

Re: [sqlite] Catching run-away queries

2017-05-04 Thread Chris Locke
Excellent, thanks - I'll pass that on. Very much appreciated. Thanks, Chris On Thu, May 4, 2017 at 4:52 PM, Richard Hipp <d...@sqlite.org> wrote: > On 5/4/17, Chris Locke <sql...@chrisjlocke.co.uk> wrote: > > If sqlite is given a slightly misconfigured SQL statement (e

[sqlite] Catching run-away queries

2017-05-04 Thread Chris Locke
If sqlite is given a slightly misconfigured SQL statement (eg, incorrect JOIN statements), it could potentially try and retrieve millions of rows. (Question taken from here: https://github.com/sqlitebrowser/sqlitebrowser/issues/1005) Is there any way of hooking into this before the actual records

Re: [sqlite] Couldn't load a sqlite.dll

2017-05-04 Thread Chris Locke
Obviously the information given is a bit sparse. I'm assuming from a .dll you're using Windows? What steps have you taken, and what is giving this error? On Thu, May 4, 2017 at 11:54 AM, prabha karan wrote: > Dear All, > I got this exception except my system ... Pls

Re: [sqlite] Sqlite + Dropbox

2017-04-07 Thread Chris Locke
Another 'sharing solution' which is just getting off the ground is dbhub.io, (https://dbhub.io) This is a 'github for sqlite databases' allowing you to share databases, have version control, etc. Thanks, Chris On Fri, Apr 7, 2017 at 6:22 PM, Warren Young wrote: > On Apr

Re: [sqlite] Reporting Solutions that work with SQLite / VB 2015?

2017-03-24 Thread Chris Locke
Have you tried exporting to Excel? They're are even components (relatively cheap) to convert to PDF so both bases are covered. Exporting to excel allows columns to be used so figures line up nicely. Open source applications open excel files. Thanks, Chris On 24 Mar 2017 8:03 p.m., "James K.

Re: [sqlite] RIGHT JOIN! still not supported?

2017-03-22 Thread Chris Locke
An interesting discussion of it on StackOverflow... http://stackoverflow.com/questions/689963/does-anyone-use-right-outer-joins To give one example where a RIGHT JOIN may be useful. Suppose that there are three tables for People, Pets, and Pet Accessories. People may optionally have pets and

Re: [sqlite] RIGHT JOIN! still not supported?

2017-03-20 Thread Chris Locke
Sqlite is public domain, so feel free to add the necessary code, and once approved, it'll get added to the main code. Thanks, Chris On 20 Mar 2017 8:09 p.m., "PICCORO McKAY Lenz" wrote: > i got this > > Query Error: RIGHT and FULL OUTER JOINs are not currently

Re: [sqlite] feature req: PLEASE why the heck COMMENT fields are not supporte in years!!

2017-03-15 Thread Chris Locke
Just add a 'comments' table. Seems a lot of extra work and 'extra tools' needed to read the comments, which could potentially be missed. Add a 'comments' table with a 'comment' field which you can even add dates, usernames, etc, to. Thanks, Chris On Wed, Mar 15, 2017 at 11:12 AM, Clemens

Re: [sqlite] How to use parameterized queries in SQLite.Net

2017-03-14 Thread Chris Locke
From a newbie's point of view, how is this better (if doing it in 'hard coded' format like below) than writing this code: command.CommandText = string.format("INSERT INTO trend_data (tag_key, value, value_timestamp) VALUES ({0}, {1}, {2})",2,234.56,now); I can sort of understand it if its in a

Re: [sqlite] confused getting started

2017-03-06 Thread Chris Locke
NT- I write a lot of vb.net programs that use sqlite databases, so will be happy to run though a beginners guide. It would be painless to convert from vb.net to c# Thanks, Chris ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org

Re: [sqlite] SQLite3.dll for x64

2017-03-06 Thread Chris Locke
Or user error. "Thanks. Also found out where I was going wrong. While creating the .lib file, weshould be using the following command: lib /def:sqlite3.def /machine:X64 /out:sqlite3.lib I was skipping the /machine:X64 option before." On Mon, Mar 6, 2017 at 10:48 AM, Anick Saha

Re: [sqlite] Retrieve INTEGER PRIMARY KEY

2017-02-06 Thread Chris Locke
Ursprüngliche Nachricht- > > Von: sqlite-users [mailto:sqlite-users-boun...@mailinglists.sqlite.org] > Im Auftrag von Chris Locke > > Gesendet: Freitag, 03. Februar 2017 15:41 > > An: SQLite mailing list <sqlite-users@mailinglists.sqlite.org> > > Betreff: Re: [sqlite] Retriev

Re: [sqlite] Retrieve INTEGER PRIMARY KEY

2017-02-03 Thread Chris Locke
Last_insert_rowid() https://www.sqlite.org/c3ref/last_insert_rowid.html On Fri, Feb 3, 2017 at 1:51 PM, Clyde Eisenbeis wrote: > For OLE DB SQL, I have retrieved the primary key: > > - > using (System.Data.OleDb.OleDbConnection oledbConnect = new

Re: [sqlite] About ticket c92ecff2ec5f1784 LEFT JOIN problem

2017-01-11 Thread Chris Locke
Ken, That went to the mailing list ... to which you are also a recipient of ;) Thanks, Chris ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Datatype for prices (1,500)

2016-12-02 Thread Chris Locke
PHP will easily display a value with trailing zeros - you don't add '00' programmatically. eg: $number = number_format(1234, 2, '.', ''); On Thu, Dec 1, 2016 at 8:08 AM, Werner Kleiner wrote: > As I can see storing prices is a topic with different ways and > different

Re: [sqlite] Datatype for prices (1,500)

2016-11-30 Thread Chris Locke
I recently had this problem. Values stored as real values. Had to check records in the database to see if any value had changed, and needed updating. Even though all values in my code were singles, I had bad rounding problems where (as an example) 0.1+2.2 did not equal 2.3 in the database. Aargh.

Re: [sqlite] Encryption

2016-11-15 Thread Chris Locke
Ulrich- a fantastically detailed post. On Mon, Nov 14, 2016 at 3:23 PM, Ulrich Telle wrote: > Richard, > > > Well what I've done is to create an encrypted database with > > SQLite2009 and then use that in my C# project. I just add the password to > > the connection string

Re: [sqlite] Encryption

2016-11-12 Thread Chris Locke
Encryption in system.data.sqlite is legacy encryption, only used within itself, and not with other applications. On Fri, Nov 11, 2016 at 6:24 PM, Richard Andersen wrote: > > > I'm using the ADO.NET version (System.Data.SQlite). > > I've created an RSA encrypted database using

Re: [sqlite] Inserting a new record (anywhere) into a table of ordered records that have an integer auto-increment primary key

2016-10-16 Thread Chris Locke
But be careful, as you can't change all records from 3 to 4 and then 4 to 5, as the 4 to 5 will contain the records you've just moved from 3 to 4 Canofworms.jpg. ;) Thanks, Chris On 15 Oct 2016 5:46 p.m., "Richard Damon" wrote: > On 10/15/16 12:15 PM, Simon

Re: [sqlite] Database malformed after 6000 Inserts?

2016-10-05 Thread Chris Locke
Are you accessing the database across a network, or is local on the server? Are you using a transaction, or are these individual inserts? I'm using system.data.sqlite.dll for a file backup program and that happily rattles through 800,000 inserts (continuously) without issues. Its worth noting that

Re: [sqlite] Convert mysql to sqlite

2016-09-12 Thread Chris Locke
What OS are you using? There is a freeware utility here for Windows: http://sqlite2009pro.azurewebsites.net/ Thanks, Chris On Sat, Sep 10, 2016 at 10:24 PM, Scott Doctor wrote: > I have a database with a few tables and about 140MB of data in it that > exists as a MySQL

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

2016-09-07 Thread Chris Locke
>First of all, I'll check all the pragmas and stuff, plus the version of > SQliteBrowser (former DB Browser for SQlite indeed) I'm using, etc. Just to confirm (as it seems to be overlooked) that SQLite Browser (actually now called DB Browser for SQLite, rather than formerly...) is a 3rd party

Re: [sqlite] "Responsive" website revamp at www.sqlite.org

2016-09-07 Thread Chris Locke
Makes perfect sense. Thanks. Chris On Tue, Sep 6, 2016 at 12:26 PM, Richard Hipp <d...@sqlite.org> wrote: > On 9/6/16, Chris Locke <ch...@chrisjlocke.co.uk> wrote: > > When reducing the size of the browser (on Chrome desktop at least) the > '*** > > DRAFT ***

Re: [sqlite] "Responsive" website revamp at www.sqlite.org

2016-09-06 Thread Chris Locke
When reducing the size of the browser (on Chrome desktop at least) the '*** DRAFT ***' tag disappears. Rather than disappears, maybe this should be reduced in size and always be visible? Edit: Noticed its right at the bottom of the page, regardless of size, but not at the top. Is this by design?

Re: [sqlite] [System.Data.SQLite.DLL] Retrieving table names with column names

2016-07-24 Thread Chris Locke
. A necessary evil, and 'the right thing', but still a pain... Thanks, Chris On Fri, Jul 22, 2016 at 11:33 AM, R Smith <rsm...@rsweb.co.za> wrote: > > > On 2016/07/21 11:20 PM, Chris Locke wrote: > >> I've a table I'm calling recursively. >> >> ... >&g

Re: [sqlite] [System.Data.SQLite.DLL] Retrieving table names with column names

2016-07-24 Thread Chris Locke
nce of > joins. > > Since your programming environment does seem to care about column names, > you will have to set them explicitly. > > -Ursprüngliche Nachricht- > Von: sqlite-users-boun...@mailinglists.sqlite.org [mailto: > sqlite-users-boun...@mailinglists

[sqlite] Fwd: Your message to sqlite-users awaits moderator approval

2016-07-21 Thread Chris Locke
Bit of a noob question, but whenever I post to the group, I get the below email - 'you're not part of the group'. How does one join the group? I've subscribed, so get all the emails... just wondering if there was a second step, or if all group messages get moderated. Thanks, Chris On Wed, Jul

[sqlite] [System.Data.SQLite.DLL] Retrieving table names with column names

2016-07-21 Thread Chris Locke
I've a table I'm calling recursively. CREATE TABLE "staff" ( `id` TEXT, `logonName` TEXT, `firstname` TEXT, `surname` TEXT, `departmentId` TEXT, `managerId` TEXT, `holidayDaysEntitlement` INTEGER, `holidayDaysTaken` REAL, PRIMARY KEY(`id`) ) managerId points to the same table, so my join is

Re: [sqlite] Possible index corruption

2016-07-13 Thread Chris Locke
*everyone rushes to download the files to have a nose* On Wed, Jul 13, 2016 at 12:02 PM, Richard Hipp wrote: > Off-list reply > > On 7/13/16, Miroslav Rajcic wrote: > > > > Note that I had to delete other tables to protect customer info. > > You did

Re: [sqlite] Query question: order by ascending, return the two largest values in ascending order

2016-07-12 Thread Chris Locke
Whats the benefit of getting a sorted query and then sorting that query again? On Tue, Jul 12, 2016 at 12:45 AM, Stephen Chrzanowski wrote: > Simons + My answer; > > select * from (SELECT date_time_stamp FROM general ORDER BY date_time_stamp > DESC LIMIT 2) a order by

Re: [sqlite] Question about C# with SQLite

2016-07-07 Thread Chris Locke
n\Microsoft.Common.CurrentVersion.targets(3506,5): > warning MSB3178: Assembly 'SQLite\System.Data.SQLite.dll' is incorrectly > specified as a file. > > It not affect the final release program, but I don't know how it comes from > and how to eliminate it. > > Thank you! > &g

Re: [sqlite] SQLite Logo

2016-07-07 Thread Chris Locke
Blimey - arguments over a feather, However, I want to argue about your "They look nothing alike" and I would say to a non-feather expert, they are very similar. Same orientation (upwards, pointing to the right), white middle, a nick on the right. They do look alike ... very alike. Chris On

Re: [sqlite] Question about C# with SQLite

2016-07-05 Thread Chris Locke
You might need something like Microsofts Process Monitor. https://technet.microsoft.com/en-us/sysinternals/processmonitor.aspx?f=255=-2147217396 I was getting similar 'red herrings' when deploying my .exe and system.data.sqlite.dll - it was moaning that it couldn't load the DLL. Indeed it

Re: [sqlite] Correct, best, or generally accepted database structure for groups of things

2016-06-17 Thread Chris Locke
Thanks James. Points taken on board. :-) Chris On Fri, Jun 17, 2016 at 5:24 PM, James K. Lowden <jklow...@schemamania.org> wrote: > On Fri, 17 Jun 2016 07:37:16 +0100 > Chris Locke <ch...@chrisjlocke.co.uk> wrote: > > > I fail to see what any of this has to

Re: [sqlite] Correct, best, or generally accepted database structure for groups of things

2016-06-17 Thread Chris Locke
John McKown > > Sent: Friday, June 17, 2016 9:35 AM > > To: SQLite mailing list > > Subject: Re: [sqlite] Correct, best, or generally accepted database > structure > > for groups of things > > > > On Fri, Jun 17, 2016 at 1:37 AM, Chris Locke <ch...@chrisjlock

Re: [sqlite] Correct, best, or generally accepted database structure for groups of things

2016-06-17 Thread Chris Locke
I fail to see what any of this has to do with sqlite. I thought this was a mailing list for sqlite? Seeing queries (no pun intended) on sql statements is very subjective, especially with the limited data provided by the original poster. Everyone will give helpful advice, but it won't stop there,

Re: [sqlite] Update DataGrid and Save to database

2016-06-13 Thread Chris Locke
Great analogy. PS: What colour seat covers should I be using if I have a Ford? On Mon, Jun 13, 2016 at 2:11 PM, jumper wrote: > Thank you for the advice/information. I just solved the issue about a > minute ago. How can I stop getting new replies? > > > On 6/13/2016 8:08 AM,

  1   2   >