Re: [sqlite] ADO.NET driver upgrade puzzle

2017-09-25 Thread Darko Volaric
If you're accessing a database concurrently from different processes then you may want to look at this: https://sqlite.org/faq.html#q5 as your file system may be causing you problems. > On Sep 25, 2017, at 11:09 AM, Roberts, Barry (FINTL)

Re: [sqlite] Data types for date and time functions

2017-09-25 Thread Igor Tandetnik
On 9/25/2017 8:23 AM, Stephan Buchert wrote: I was just going to write that you can easily convert an MS serial date value stored in Sqlite to a date string (using 40777 as example): sqlite> select date('1899-12-31', 40777||' days'); 2011-08-23 However, according to

Re: [sqlite] Data types for date and time functions

2017-09-25 Thread R Smith
On 2017/09/25 2:23 PM, Stephan Buchert wrote: I was just going to write that you can easily convert an MS serial date value stored in Sqlite to a date string (using 40777 as example): sqlite> select date('1899-12-31', 40777||' days'); 2011-08-23 However, according to

Re: [sqlite] ADO.NET driver upgrade puzzle

2017-09-25 Thread Roberts, Barry (FINTL)
Hi Clemens, As per my original post, all C# access code is making extensive use of "using" statements. However we do obviously rely on the connection pool being thread safe, because many threads are writing to different databases (connections) concurrently. There is no direct relationship

[sqlite] Data types for date and time functions

2017-09-25 Thread Stephan Buchert
I fired up an MS Excel 2013 and yes, there 1900-02-29 exists and counts for the serial date value! My original comment was, that also storing in Sqlite the MS serial date values would be possible (as well as Matlab date numbers, etc.), and the Sqlite date/time functions allow quite easily to do

Re: [sqlite] Data types for date and time functions

2017-09-25 Thread J. King
On 2017-09-25 08:19:52, "R Smith" wrote: On 2017/09/25 10:12 AM, David Wellman wrote: C - Storing a string with a date or date and time, typically the standard form is ISO8601 which looks like '-MM-DDTHH:NN:SS.MSS +ZZ:ZZ' with the T optionally being a space and the +

Re: [sqlite] Data types for date and time functions

2017-09-25 Thread R Smith
On 2017/09/25 3:46 PM, R Smith wrote: PS: I refer to "Excel" only, but the problem probably persists in all of MS Office, though I didn't check. Thanks to Igor's post and some quick testing, I can confirm that it seems to only affect Excel, not all of MS Office.

Re: [sqlite] Data types for date and time functions

2017-09-25 Thread Keith Medcalf
On Monday, 25 September, 2017 06:20, R Smith wrote: >On 2017/09/25 10:12 AM, David Wellman wrote: >All of these have pro's and cons. Integer storage is usually most >efficient, but it takes some calculation to interpret, however SQLite >is very efficient at it, but if you

[sqlite] Data types for date and time functions

2017-09-25 Thread David Wellman
Hi, We're designing a new feature which will involve a lot of date/time calculations which we intend to do within the SQLite engine. As far as we can tell it has the functions that we need. Basically we'll be loading data into SQLite and performing analysis and calculations using SQL. The

Re: [sqlite] ADO.NET driver upgrade puzzle

2017-09-25 Thread Darko Volaric
That's not strictly true, it depends on the threading mode: https://sqlite.org/threadsafe.html It sounds like the driver is trying to manage concurrency on its own and failing. For the purposes of calling sqlite, if the library is used in the default

Re: [sqlite] ADO.NET driver upgrade puzzle

2017-09-25 Thread Clemens Ladisch
Roberts, Barry (FINTL) wrote: > The application is multi-threaded > > the system sometimes locks up, or marks one or more of the db3 as malformed. Sounds like a threading problem. You should not have more than one thread accessing the same connection concurrently. > Using (connection) > Open

Re: [sqlite] Data types for date and time functions

2017-09-25 Thread Clemens Ladisch
David Wellman wrote: > The question has come up as to how we should store date/time values in our > tables? Basically how should we define our date/time columns? SQLite does not have a separate date/time type. If you want to use the built-in date/time function, you can store values in one of

Re: [sqlite] Data types for date and time functions

2017-09-25 Thread Paul Sanderson
Internally SQLite stores and process numbers as Julian day numbers, the number of days since noon in Greenwich on November 24, 4714 B.C. I have not examined the code in any depth but would assume that if you store the data in the same format it would save on any processing overhead for

[sqlite] ADO.NET driver upgrade puzzle

2017-09-25 Thread Roberts, Barry (FINTL)
Hi, We have a C# application which logs data in real-time to sqlite files. The application is multi-threaded, and typically logs 200-500 data streams simultaneously. The logging rate per stream is 1Hz to 1000Hz, depending on the type of data coming in. Each data stream is logged to its own db3

Re: [sqlite] Data types for date and time functions

2017-09-25 Thread R Smith
On 2017/09/25 10:12 AM, David Wellman wrote: Hi, We're designing a new feature which will involve a lot of date/time calculations which we intend to do within the SQLite engine// The question has come up as to how we should store date/time values in our tables? Basically how should

[sqlite] Data types for date and time functions

2017-09-25 Thread Stephan Buchert
I was just going to write that you can easily convert an MS serial date value stored in Sqlite to a date string (using 40777 as example): sqlite> select date('1899-12-31', 40777||' days'); 2011-08-23 However, according to