Re: [sqlite] Frequent database corruptions on Windows 10

2016-09-11 Thread William Drago
On 9/10/2016 1:16 PM, Olivier Mascia wrote: Le 10 sept. 2016 à 11:21, Alexander Täschner a écrit : since upgrading to Windows 10 I have trouble with several different C# programs I wrote, that uses System.Data.SQLite to access sqlite database files ... 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] Messages posted on Nabble not getting to list

2016-05-27 Thread William Drago
On 5/27/2016 1:23 AM, Jean-Christophe Deschamps wrote: At 03:46 27/05/2016, you wrote: If SQLite goes this route, I will probably (as with the others) stop reading it too. Seconded. Thirded. I have mostly given up on the email lists that have converted to forums. There are two left that

Re: [sqlite] What could be the cause of a zero length database file?

2016-05-24 Thread William Drago
The sequence is: * open a new database file * issue a sequence of several SQL commands in a single transaction (one BEGIN, one COMMIT at the end). The database ends up as a zero length file. Is this a) a normal consequence of the above if the single transaction is aborted (say due to an SQL

[sqlite] How to get 1 row with no null columns

2016-05-11 Thread William Drago
All, Is there a simple way to find a row in a table where none of columns contain a null value? For example: SELECT * FROM AnyTable WHERE (all columns IS NOT NULL) LIMIT 1; Or do I have to do this manually in my application scanning every column in every row until I find a row with no nulls?

[sqlite] Pascal (almost) style BLOBs

2016-04-19 Thread William Drago
On 4/18/2016 6:46 AM, Paul Sanderson wrote: > You could use a binary PList or some other form of structured data - > the BPList blob could then contain, ints, floats, strings byte arrays > or even embedded binary plists. As it is a structured format then to > an extent it is self documenting (in

[sqlite] Pascal (almost) style BLOBs

2016-04-17 Thread William Drago
On 4/17/2016 10:13 AM, Brad Stiles wrote: > An ADO.NET DataTable *can* have type information for table columns, if you > add a parameter to the WriteXml method to have it write the schema along with > the data. Obviously, *their* data must be typed from their source, or be > inferred, for this

[sqlite] Pascal (almost) style BLOBs

2016-04-17 Thread William Drago
On 4/17/2016 9:45 AM, Simon Slavin wrote: > On 17 Apr 2016, at 1:02pm, William Drago wrote: > >> I am forced to consider this approach because my function will be receiving >> blobs but will have no idea what those blobs are. > Why do you care ? A BLOB is a BLOB. It doesn'

[sqlite] Pascal (almost) style BLOBs

2016-04-17 Thread William Drago
On 4/17/2016 9:20 AM, Ketil Froyn wrote: > I'm not sure I understand why you can't specify the type in a separate > column, rather than prepending it to the blob? That seems like a more > flexible way to have access to the information. I have no control over the database schema, table structure,

[sqlite] Pascal (almost) style BLOBs

2016-04-17 Thread William Drago
On 4/17/2016 9:45 AM, Simon Slavin wrote: > On 17 Apr 2016, at 1:02pm, William Drago wrote: > >> I am forced to consider this approach because my function will be receiving >> blobs but will have no idea what those blobs are. > Why do you care ? A BLOB is a BLOB. It doesn'

[sqlite] Pascal (almost) style BLOBs

2016-04-17 Thread William Drago
On 4/17/2016 9:20 AM, Ketil Froyn wrote: > I'm not sure I understand why you can't specify the type in a separate > column, rather than prepending it to the blob? That seems like a more > flexible way to have access to the information. I have no control over the database schema, table structure,

[sqlite] Pascal (almost) style BLOBs

2016-04-17 Thread William Drago
All, Any thoughts on using the first byte of a BLOB to indicate what kind of data that BLOB contains? For example: 0 = plain old bytes 1 = 16 bit integers 2 = 32 bit integers 3 = singles 4 = doubles, etc. I am forced to consider this approach because my function will be receiving blobs but

[sqlite] Error help

2016-04-05 Thread William Drago
>> I was taught the basics in SQLite with Firefox, and >> am already disappointed that I can't really do what I want to do with the >> Firefox plug in. > Plenty of other ways to use SQLite with a graphical GUI: > > > >

[sqlite] Slow real world performance - Any suggestions please (warning long)

2015-07-04 Thread William Drago
On 7/3/2015 8:39 AM, Rob Willett wrote: > Simon, > > We had missed the incorrect defn of Calculate in the index. We?ve been > changing around stuff and suspect we omitted to check as carefully as we we > should when changing :( > > We?ll also update BayesAttribute as well. > > We?re actually

[sqlite] Reader.GetBytes() - when is a byte not a byte?

2015-07-04 Thread William Drago
Jean, Thanks for the reply. I understand this very well, and I have read this page many times over the past few years: http://www.sqlite.org/datatype3.html My argument is that regardless of a column's type or type affinity, a method called ReadBytes() should read the bytes as stored in the

[sqlite] Reader.GetBytes() - when is a byte not a byte?

2015-07-02 Thread William Drago
All, Below is a .dump of the database I'm working with. I can use GetBytes() successfully on all the BLOB columns except myTextArray. On that column I get a System.InvalidCastException error. Can anyone tell me why? Thanks. -Bill ---.dump file--- PRAGMA foreign_keys=OFF; BEGIN

[sqlite] Please explain SQLiteConnection.GetSchema restrictionValues

2015-05-16 Thread William Drago
Thank you very much, Joe. I'll chew on this for a while and see if I can make sense of it. -Bill On 5/15/2015 11:34 PM, Joe Mistachkin wrote: > I just updated the documentation with more details, here: > > https://system.data.sqlite.org/index.html/ci/4be7ad3120577d30?sbs=0 > > -- > Joe

[sqlite] Please explain SQLiteConnection.GetSchema restrictionValues

2015-05-15 Thread William Drago
All, I'm using SQLiteConnection.GetSchema, and it is working, but I don't really understand why. Can anyone explain or point me to an explanation of how restrictionValues are used in that method? There's no explanation in SQLite.NET.chm and the little bit I could find on line is not very

[sqlite] Please confirm what I THINK I know about blobs

2015-05-09 Thread William Drago
On 5/9/2015 6:40 AM, Eduardo Morras wrote: > On Sat, 09 May 2015 06:09:41 -0400 > William Drago wrote: > >> All, >> >> Say you encounter a blob in a database. There's no way to >> tell if that blob carries bytes, floats, doubles, etc, correct? >> >>

[sqlite] VBA Sqllite blob data

2015-05-09 Thread William Drago
You may find what you need here: https://sqliteforexcel.codeplex.com/ Good luck, -Bill On 5/8/2015 3:15 PM, Preston King wrote: > Does anyone have an example of how to read sqlite blob records, that are not > pictures, into Excel? I have been trying to find some VBA code to do this but > am

[sqlite] Please confirm what I THINK I know about blobs

2015-05-09 Thread William Drago
All, Say you encounter a blob in a database. There's no way to tell if that blob carries bytes, floats, doubles, etc, correct? Assuming the above is true, then is it always prudent to store some metadata along with your blobs so that they can be identified in the future? Example table:

[sqlite] System.Data.SQLite, Need alternate way to get field length

2015-05-02 Thread William Drago
All, I am trying to determine the number of bytes in a blob. According to the help file under SQLiteDataReader.GetBytes Method in the Remarks section: "To determine the number of bytes in the column, pass a null value for the buffer. The total length will be returned." I'm working in VEE and

Re: [sqlite] capturing and testing a hot journal

2014-07-14 Thread William Drago
On 7/14/2014 6:38 PM, mm.w wrote: seriously? you should fix and solve why the soft crashed in the first place, reality check please. The software doesn't crash on its own; I'm forcing it to crash with a divide-by-zero for test purposes. This doesn't happen in actual use and there's no reason

Re: [sqlite] Basic SQLite/EF6 question

2014-07-06 Thread William Drago
On 7/5/2014 12:38 PM, Joe Mistachkin wrote: Do you see the System.Data.SQLite option in the Data Connections dialog within Server Explorer in Visual Studio? Yes, and I can see my tables, etc. too. Which version and edition of Visual Studio are you using? Microsoft Visual Studio

Re: [sqlite] Basic SQLite/EF6 question

2014-07-05 Thread William Drago
On 7/4/2014 10:11 PM, Joe Mistachkin wrote: William Drago wrote: "Your project references the latest version of Entity Framework; however, an Entity Framework database provider compatible with this version could not be found for your data connection." In my end-to-e

Re: [sqlite] Basic SQLite/EF6 question

2014-07-04 Thread William Drago
found for your data connection." I've rebuilt the project and exited ad restarted VS, but no luck. Any Ideas? Thanks, -Bill On 7/4/2014 7:25 PM, Joe Mistachkin wrote: William Drago wrote: I found this on Stack Overflow and it's pretty scary. Do I really have to do all this to get

[sqlite] Basic SQLite/EF6 question

2014-07-04 Thread William Drago
All, I am trying to use EF6.1.1 and SQLite 1.0.93.0 (3.8.5) in VS 2013. I've never used EF6 before, but I have been using System.Data.SQLite the normal way for about a year. now with excellent results. My question is, when I try to add a new ADO.NET Entity Data Model the only connection

Re: [sqlite] System.Data.SQLite fails to load

2014-02-26 Thread William Drago
On 2/26/2014 5:50 AM, Simon Slavin wrote: On 26 Feb 2014, at 10:19am, William Drago <wdr...@suffolk.lib.ny.us> wrote: VEE is a graphical programming language similar to NI LabView. Is this Agilent VEE ? If it's very like LabView then you shouldn't be using a .NET framework

Re: [sqlite] System.Data.SQLite fails to load

2014-02-26 Thread William Drago
On 2/25/2014 3:44 PM, Joe Mistachkin wrote: William Drago wrote: I am using System.Data.SQLite with a relatively uncommon language called VEE. This is an interpreted language that runs in a 32bit development/runtime environment. I've never heard of this language before; however, it sounds

[sqlite] System.Data.SQLite fails to load

2014-02-25 Thread William Drago
All, I am using System.Data.SQLite with a relatively uncommon language called VEE. This is an interpreted language that runs in a 32bit development/runtime environment. My application works fine when run on an internal or USB thumb drive. However, if I try running it from a network drive

[sqlite] Correct order of 'using' in System.Data.SQLite

2013-11-16 Thread William Drago
All, I am still new to SQLite and C#. I am wondering if I have the correct order of 'using' statements in the code below. In particular, I am wondering if 'using (transaction...)' should come before 'using (SQLCommand...)' Any other comments are appreciated. Thanks, -Bill

Re: [sqlite] a tool that allows you to graphically change sqlite schema

2013-09-22 Thread William Drago
I like SQLite Expert too. Very nice tool, you don't have to run Firefox to use it, and the personal edition is free. I've gotten a lot of good use out of it. Windows only is the one drawback. -Bill On 9/18/2013 5:09 AM, jcd wrote: Is there a tool that allows you to graphically change

Re: [sqlite] Question about date & time

2013-09-16 Thread William Drago
Thanks for the reply. I understand. I am going to do some experimenting just to make sure... Regards, -Bill On 9/15/2013 3:13 PM, Petite Abeille wrote: On Sep 15, 2013, at 8:31 PM, William Drago <wdr...@suffolk.lib.ny.us> wrote: Thanks for the reply. Seconds since the epoch does make

Re: [sqlite] Question about date & time

2013-09-15 Thread William Drago
specific question as the answer is probably going to be the same regardless of the DBMS. Thanks, -Bill On 9/15/2013 1:16 PM, Tim Streater wrote: On 15 Sep 2013 at 18:13, William Drago <wdr...@suffolk.lib.ny.us> wrote: All, Should I put date and time in separate columns if I want to select b

[sqlite] Question about begin/commit

2013-09-15 Thread William Drago
All, In the following bit of code found in the help file SQLite.NET.chm, I see that BeginTransaction() encloses everything. I always thought that just the for-loop needed to be enclosed by begin/commit. What are the reasons for enclosing the other commands? Thanks, -Bill using

[sqlite] Question about date & time

2013-09-15 Thread William Drago
All, Should I put date and time in separate columns if I want to select by time? For example: SELECT * FROM testresults WHERE (status != "Pass") AND (23:00 <= testtime) AND (testtime <= 01:00). I have been reading the documentation, but it just isn't clear to me how I should handle this.

[sqlite] String not valid DateTime

2012-12-10 Thread William Drago
All, I am using SQLite with C# and am having trouble with SQLite DATETIME types. The following error occurs when trying to read rows from a table that contains dates (e.g. "12/09/2012 22:51:24"). (I am using a SQLiteDataReader to put query results into a C# DataTable.) "String was not

Re: [sqlite] Newbie issues with SQLite & C#

2012-12-03 Thread William Drago
with the Firefox SQLite Manager plug-in and was able to read from them with my C# program. One thing I'm still curious about are these Visual Studio design components. What are they and how do I access them from VS? Thanks again, Bill On 12/3/2012 2:50 AM, Joe Mistachkin wrote: William Drago

[sqlite] Newbie issues with SQLite & C#

2012-12-02 Thread William Drago
All, This is my first post to this group... I'm hoping someone can help me. I've just wasted nearly 8 hours trying to get SQLite to work with a C# program in Visual Studio 10 (32bit WinXP, .NET 4.0). Here are the issues: 1) I'm not really sure how to install SQLite. I downloaded