[sqlite] System.Data.Sqlite, not using parameterized query, how to encode special characters

2015-01-16 Thread Andy (KU7T)
Hi, Some of my single row inserts use parameterized queries today to make encoding easier. For example having embedded single quotes in strings etc. Now, I would like to take advantage of the multi row inserts as described in

[sqlite] Increase page_size on existing db with data and WAL

2015-01-16 Thread Andy (KU7T)
Hi, When I read this: http://sqlite.org/pragma.html#pragma_page_size it seems to argue that I can never change the page_size on a non-empty db that is running in WAL mode. Any tips how I can still do this? Thanks Andy ___ sqlite-users mailing

[sqlite] Page_size increase from 1k to 4k made my "REPLACE INTO" slower. why?

2015-01-19 Thread Andy (KU7T)
Hi, I am using System.Data.SQLite, Version=1.0.92.0. I read that increasing the page_size to 4k on modern OS is a good thing and should speed things up. However, I have a particular query that takes substantially longer. I tried to make sure that nothing else is changed, so I am a little

[sqlite] When to run ANALYZE

2015-01-19 Thread Andy (KU7T)
Hi, I added a call to both: ANALYZE ANALYZE sqlite_master To my app at timely intervals. We are also running in WAL mode. Do I need to do a WAL checkpoint (pragma wal_checkpoint) before running the index recalc or not? Thanks Andy ___

[sqlite] Changing Page_size fails sometimes, retry succeeds but is messy. Ideas?

2015-01-19 Thread Andy (KU7T)
Hi, I determined that I would like to upgrade my page_size from 1k to 4k during start up time if it is not done yet. At the time I would like to do that, no other db access is occurring yet. Still, I see failures that often the page_size returned at the end in the verification step is still

[sqlite] What does output from integrity check mean and how can I prevent this?

2015-12-21 Thread Andy KU7T
Hi, Using sqlite dbs for my program (official .NET sqlite.interop.dll, v. 1.0.92.0). Have not had any db integrity issues until today. One user send me a db, I ran Sqlite Expert professionals's integrity checker and got this: *** in database main *** On tree page 2 cell 14: 2nd reference to

[sqlite] Next version of System.Data.Sqlite bug fixes only or new features?

2015-03-05 Thread Andy (KU7T)
I have been reading there are a few issues with v 95, so I am waiting for the next. Will there be a version that has only bug fixes or new features as well? As many of you know, new features usually also create regressions. Thanks Andy

[sqlite] Sql update script. check for existing rows before inserting...

2020-02-23 Thread Andy KU7T
Hi, I would like to write a script that checks whether certain records already exist, and if not, insert them. If they do exist, it should be a no op. I am trying this: IF (SELECT COUNT(*) FROM [Antennas]) = 0 BEGIN /* Table data [Antennas] Record count: 16 */ INSERT OR REPLACE INTO

[sqlite] After column add, what should be done to update the schema?

2020-02-27 Thread Andy KU7T
Hi, I use a simple ALTER TABLE ADD COLUMN statement. However, when I use the Sqlite Expert, the DDL is not reflected. Even though the column is created. I read somewhere that the DDL is really just a copy of the text when teh table was created. Is there a way to refresh this? Thanks, Andy

[sqlite] SqlLite.Net: Tables creation and schema changes strategies

2020-02-08 Thread Andy KU7T
Hello, I'm looking for best practices on when and where to create/initialize your tables when using SqlLite.Net as well as how to properly handle schema changes from one version to another. It seems I could roll my own using large SQL files or use some library that can do the updates for me…

Re: [sqlite] SqlLite.Net: Tables creation and schema changes strategies

2020-02-08 Thread Andy KU7T
sqlite] SqlLite.Net: Tables creation and schema changes strategies On 8 Feb 2020, at 3:10pm, Andy KU7T wrote: > I'm looking for best practices on when and where to create/initialize your > tables when using SqlLite.Net as well as how to properly handle schema > changes from one version to a

Re: [sqlite] Searching by Guid index in table (.NET)? I can write and read, but not search by the Guid

2020-02-14 Thread Andy KU7T
ld use different parameter type. I would use TEXT type. Regards R.A. On 14.02.2020 15:09, Andy KU7T wrote: > Hi, > > I am having trouble searching for a Guid. I think some conversion is missing. > I wonder if someone can point me to the error… > > Column: > [ID] GUID(16) >

[sqlite] Searching by Guid index in table (.NET)? I can write and read, but not search by the Guid

2020-02-14 Thread Andy KU7T
Hi, I am having trouble searching for a Guid. I think some conversion is missing. I wonder if someone can point me to the error… Column: [ID] GUID(16) Index: CREATE UNIQUE INDEX [ID_INDEX] ON [DXLOG]([ID] COLLATE [BINARY] ASC); Trigger: CREATE TRIGGER [AUTOGENERATE_ID] AFTER INSERT ON [DXLOG]

[sqlite] Is randomblob(16) a good guid generation across multiple computers?

2020-02-20 Thread Andy KU7T
Hi, I added a randomblob(16) to each record of a Sqlite table via a trigger with the goal of global uniqueness. Is that the correct approach or would it be better to pass Guid from .Net? I am using System.Data.Sqlite. The following article got me questioning the usage of randomblob:

Re: [sqlite] Is randomblob(16) a good guid generation across multiple computers?

2020-02-20 Thread Andy KU7T
I admit I do not fully understand all the arguments. I am running on Windows. Are you saying the PRNG on Windows is not good enough to use randomblob(16) in Sqlite? All I need is a reasonable assurance that is are unique... Andy Sent from my T-Mobile 4G LTE Device Get Outlook for