Re: [sqlite] Bug in SQLite version 3.31.1 and 3.32?
I just want to point something out that might help the original poster. On Saturday, March 7, 2020, 7:00:21 AM EST, sqlite-users-requ...@mailinglists.sqlite.org wrote: > > 1. NULL is NULL = Yes, True, > 2. NULL is FALSE = Nope, False. > 3. NULL is TRUE = Nope, False. > 4. NULL is NOT NULL = Nope, False, > 5. NULL is NOT FALSE = Yep, True. > 6. NULL is NOT TRUE = Yep, True. > 7. TRUE is FALSE = Nope, False. > 8. TRUE is NOT FALSE = Yep, True. > 9. FALSE is NOT TRUE = Yep, True. This explanation 100% correct and probably 80% confusing without the following, especially because "is" is not capitalized:IS and IS NOT are logical operators in SQL. NOT is not a unary operator when preceded by IS. In most non-relational languages "NULL IS NOT TRUE" is parsed as: value(NULL) operator(IS) (operator(NOT) value(TRUE)). That is NOT how SQL works. In SQL, it is: value(NULL) operator(IS NOT) value(TRUE). ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] sqlite3_limit equivalent in System.Data.SQLite.dll
Assuming no blocking issues, the release should be out by the first week of March at the latest. The changes have been made to permit the limits to be changed and the default attached database limit has been increased to 30. Sent from my iPhone > On Feb 24, 2020, at 9:34 AM, Keith Bertram wrote: > > Hi Joe, > > Do you have an ETA on the new build? > > Also I wanted to confirm the change to the variable that would allow me to > set the number of attachments to a number higher than 10. I would like to set > it to 25. > > Keith > > -Original Message- > From: sqlite-users On Behalf > Of Joe Mistachkin > Sent: Saturday, January 18, 2020 6:29 PM > To: 'SQLite mailing list' > Subject: Re: [sqlite] sqlite3_limit equivalent in System.Data.SQLite.dll > > > Keith Bertram wrote: >> >> Do you have an estimated time for this release? >> > > If everything goes as planned, right around the third week of February. > > -- > Joe Mistachkin > > ___ > sqlite-users mailing list > sqlite-users@mailinglists.sqlite.org > https://urldefense.proofpoint.com/v2/url?u=http-3A__mailinglists.sqlite.org_cgi-2Dbin_mailman_listinfo_sqlite-2Dusers=DwIGaQ=hmGTLOph1qd_VnCqj81HzEWkDaxmYdIWRBdoFggzhj8=l90GvhOo_5uKc2d8JIuoVtb0fH4diec3z4TsA-hoNTc=R-68Cs5Fb8R4NqTy8Z_KN392QyIGPkeK5wUAbjuM2nE=Xr8F673ynyjKjjWcb0AImOWopT_ajZZTSmFqcw6DAdg= > > ___ > sqlite-users mailing list > sqlite-users@mailinglists.sqlite.org > http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users > ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] Possible caching issue between connections with specific inserts
Alexey Podogov wrote: > > Also, the issue can't be reproduced if: > - Cache size is set to 0; or > - Journal mode is WAL; or > - Password for database is too short (please see examples in the > demo code). > Thanks for the report. I'm looking into it now. -- Joe Mistachkin ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] sqlite3_limit equivalent in System.Data.SQLite.dll
Keith Bertram wrote: > > Do you have an estimated time for this release? > If everything goes as planned, right around the third week of February. -- Joe Mistachkin ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] sqlite3_limit equivalent in System.Data.SQLite.dll
I’ll raise the default limit for the next release of System.Data.SQLite. Sent from my iPhone > On Jan 16, 2020, at 2:01 PM, Keith Bertram wrote: > > Yes I recognize that this would be a problem. I plan on having no more than > 20-25 attachments. > > If I understand correctly, the only way to set the value above 10, is to > recompile the source and set the SQLITE_MAX_ATTACHED variable to a number > higher than my 20-25 and also below 125. I was hoping to just use the .dll > straight out of nuget. > > Keith > > -Original Message- > From: sqlite-users On Behalf > Of Simon Slavin > Sent: Thursday, January 16, 2020 10:19 AM > To: SQLite mailing list > Subject: Re: [sqlite] sqlite3_limit equivalent in System.Data.SQLite.dll > >> On 16 Jan 2020, at 3:21pm, Keith Bertram wrote: >> >> Ok. I was hoping I could set the value to a value higher than 10 without >> compiling. I'm curious why the limit is set by default to 10. > > The actual limit is 125. You can set SQLITE_MAX_ATTACHED to more than 125. > > It's worth explaining why you wouldn't want to attach 200 databases to the > same connection. Each time you refer to an attached database, SQLite has to > search for that database in a list, meaning it has to match the schema name, > then iterate through, on average, n/2 entries to find the attachment number. > The longer that list gets, the slower every operation not on 'main' or 'temp' > gets. (It's possible that SQLite hashes schema names, but I don't remember > anyone ever saying that.) > > I have seen posts to this list that say things like "We make one database > file per day, and I want to search them all at once so I want to attach 500 > files to my connection.". It's a terrible idea and would result in slow > performance. > ___ > sqlite-users mailing list > sqlite-users@mailinglists.sqlite.org > https://urldefense.proofpoint.com/v2/url?u=http-3A__mailinglists.sqlite.org_cgi-2Dbin_mailman_listinfo_sqlite-2Dusers=DwIGaQ=hmGTLOph1qd_VnCqj81HzEWkDaxmYdIWRBdoFggzhj8=l90GvhOo_5uKc2d8JIuoVtb0fH4diec3z4TsA-hoNTc=UbVOkNIBY7TVyWQB9v2LK-xBIWk_rpXp5sXbzOFNwr0=U-mtya649Yx5nGJacNeBxjNHS1gBxc2IssQUKmPwgbA= > > ___ > sqlite-users mailing list > sqlite-users@mailinglists.sqlite.org > http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users > ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] Question about passwords in System.Data.Sqlite
Mike King wrote: > > Should I be using a specific encryption extension? When I used the .Net > Framework SQLite lib I always used the encryption that came with it. > The CryptoAPI-based encryption included with System.Data.SQLite is a legacy feature, has known issues, and is officially unsupported. It is being retained only for the purpose of backward compatibility with legacy applications that make use of it. It has not been ported to .NET Core, nor has it been tested there. You might want to look into the commercial SEE extension, which does work with System.Data.SQLite on .NET Core for all supported platforms. -- Joe Mistachkin ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] Question about passwords in System.Data.Sqlite
Which encryption extension are you using? Sent from my iPhone > On Jan 2, 2020, at 5:48 PM, Mike King wrote: > > Hi, > > This is my third attempt to send the following message to the list and each > time it gets rejected as suspected administrivia! (not sure what that is - > I guess it's a US English word but it's certainly not an English one). > > I'm porting some code from .Net 4.8 to .Net Core 3.1 using the latest > System.Data.Sqlite. How do I change / set a database password if my > password is a byte array? It looks like I can use Pragma Key= if my > password is text but I use hex passwords. > > Thanks > ___ > sqlite-users mailing list > sqlite-users@mailinglists.sqlite.org > http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users > ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] System.Data.SQLite.Core and Core-Linux version Mismatch [nuget]
There doesn’t appear to be a NuGet package named “System.Data.SQLite.Core-Linux” that I can see. I don’t fully understand what the issue is here; however, in general, all versions must match up. Also, the System.Data.SQLite.Core package should contain a native binary usable on Linux x64. Sent from my iPhone > On Dec 13, 2019, at 10:50 AM, Jonathon Koyle wrote: > > When trying to install the current stable NuGet of System.Data.SQLite.Core > I get the following error: > > Error Unable to resolve dependencies. 'System.Data.SQLite.Core 1.0.112' is > not compatible with 'System.Data.SQLite.Core-Linux 1.0.110 constraint: > System.Data.SQLite.Core (= 1.0.110)'. > > As I understand, to develop cross-platform with this NuGet both packages > are needed, is that correct? It seems that System.Data.SQLite.Core-Linux > 1.0.110 and is the latest stable for that package and > System.Data.SQLite.Core 1.0.110 is not available. It seems that I can > neither update the Linux package nor install a previous version of > SQLite.Core. What is the suggested path forward? > > -- > Jonathon K. > ___ > sqlite-users mailing list > sqlite-users@mailinglists.sqlite.org > http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users > ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] Entity Framework Core support
Mike King wrote: > > "It needs to be clearly stated somewhere that EF 6.3 is meant only as a > tool for migrating from .NET Framework, and that EF Core is the version > that should be used." *2 > Given the phrasing here, it sounds like this guidance is relatively new and/or unofficial at this point? > > <https://docs.microsoft.com/en-us/ef/core/querying/client-eval>. But > because it's a new code base, it also lacks some features that EF6 has." *3 > To clarify, if it lacks features that EF6 has, it sounds a lot less like a porting effort and a lot more like a rewriting effort. That does not necessarily mean it won't get done (at some point); however, that will certainly impact it's relative priority on the roadmap. -- Joe Mistachkin ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] Deployment question
Les Woolsey wrote: > > 1. I deployed the app with the DLL's I had downloaded and the X86 & x64 >folders from the zip file. Still doesn't work. > This will not work. The "System.Data.SQLite.dll" managed DLL files are compiled with different options that dictate how it integrates with the native library code. > > 2. Deployed the app with the system.data.sqlite.dll file I have installed >but with the ef6 & Linq dll's & folders from your zip - Still doesn't >work > This also won't work, for the same reason as #1. > > 3. Deployed the app with the dlls from your zip and the folders - still >doesn't work. > What is the target operating system? Was there an error message? > > 4. As I said I my last email, I tried to rebuild my app after refoming >the reference to my system.data.sqlite and replacing it with a >reference you the one from the zip. It doesn't compile but gives >errors that SQLite does not exist in > the namespace system.data. >(Also goves further errors that derive from that problem). > I would suggest double-checking the "Target framework" setting for the project(s) on the "Application" tab within their project properties. For the set of DLLs from the new download, you'll want to make sure they are all set to .NET Framework 4.6. -- Joe Mistachkin ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] Entity Framework Core support
Mike King wrote: > > Sorry to chase an answer but is there any plans to support Entity Framework > Core in the roadmap? As I understand it the current version of EF6 is > probably going to be the last and it's likely that MS is going to recommend > people move over to Core. > Given that Entity Framework 6.3.0 was released quite recently (with .NET Core support), it seems that it should be around for a while longer. Currently, there are no specific plans to support Entity Framework Core in System.Data.SQLite. -- Joe Mistachkin ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] Deployment question
Les Woolsey wrote: > > I installed a setup package for X64 from the download page. > (sqlite-netFx45-setup-bundle-x64-2012-1.0.112.0.exe) > Thanks, I understand the situation now. Please use the files from the following download instead: https://system.data.sqlite.org/downloads/1.0.112.0/sqlite-netFx46-static-bin ary-app-2015-1.0.112.0.zip -- Joe Mistachkin ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] Deployment question
Les Woolsey wrote: > > But I went to deploy it on a new user's laptop (It's a new laptop) and > when I run it gives me an exception that says System.Data.SQL.dll one > of its dependencies was not found. So it appears I need to deploy a > bit more onto the new machine. (The old machines probabaly have some > other program which has installed the right SQLIte pieces. > Where did you obtain the built System.Data.SQLite binaries from? Do you have the "SQLite.Interop.dll" files for x86 and x64? > > My project is built in VS 2015. > If the "SQLite.Interop.dll" files were not built statically (this depends on how you obtained them) they may require the MSVC 2015 runtime to be installed. > > I have an external reference to the System.Data.SQLite.dll that was > installed in \Program Files\SQLLite\2012\bin when I installed > System.data.sqlite. > When you say "installed", do you mean to say that you obtained the files from one of the "Setup" packages on the download page? -- Joe Mistachkin ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
[sqlite] System.Data.SQLite version 1.0.112.0 released
System.Data.SQLite version 1.0.112.0 (with SQLite 3.30.1) is now available on the System.Data.SQLite website: https://system.data.sqlite.org/ Further information about this release can be seen at: https://system.data.sqlite.org/index.html/doc/trunk/www/news.wiki Please post on the SQLite mailing list (sqlite-users at mailinglists.sqlite.org) if you encounter any problems with this release. -- Joe Mistachkin ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] sqlite3_limit equivalent in System.Data.SQLite.dll
Yes, the NuGet packages are included in the release. Sent from my iPhone > On Oct 24, 2019, at 9:13 AM, Keith Bertram wrote: > > Ok. Thanks. Does it get immediately placed under nuget? > > Keith > > -Original Message- > From: sqlite-users On Behalf > Of Joe Mistachkin > Sent: Thursday, October 24, 2019 8:12 AM > To: SQLite mailing list > Subject: Re: [sqlite] sqlite3_limit equivalent in System.Data.SQLite.dll > > > Within the next week or so. > > Sent from my iPhone > >> On Oct 24, 2019, at 8:37 AM, Keith Bertram wrote: >> >> Ok. Thanks. Do you have an estimated release date? >> >> Keith >> >> -Original Message- >> From: sqlite-users On >> Behalf Of Joe Mistachkin >> Sent: Wednesday, October 23, 2019 9:08 PM >> To: 'SQLite mailing list' >> Subject: Re: [sqlite] sqlite3_limit equivalent in >> System.Data.SQLite.dll >> >> >> Keith Bertram wrote: >>> >>> The default limit for the number of attached databases appears to be >>> 10 >> with the >>> 1.0.106 version of System.Data.SQLite.dll and I would like to >>> increase >> this value >>> to 25. I've used the sqlite3_limit function in the past to increase >>> this ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] sqlite3_limit equivalent in System.Data.SQLite.dll
Within the next week or so. Sent from my iPhone > On Oct 24, 2019, at 8:37 AM, Keith Bertram wrote: > > Ok. Thanks. Do you have an estimated release date? > > Keith > > -Original Message- > From: sqlite-users On Behalf > Of Joe Mistachkin > Sent: Wednesday, October 23, 2019 9:08 PM > To: 'SQLite mailing list' > Subject: Re: [sqlite] sqlite3_limit equivalent in System.Data.SQLite.dll > > > Keith Bertram wrote: >> >> The default limit for the number of attached databases appears to be >> 10 > with the >> 1.0.106 version of System.Data.SQLite.dll and I would like to increase > this value >> to 25. I've used the sqlite3_limit function in the past to increase >> this > value >> but I don't see a matching way to do this within System.Data.SQLite.dll. >> > > Thanks for pointing this out. I'll make sure that some way to accomplish > this ends up in the 1.0.112.0 release, which is due out shortly. > > -- > Joe Mistachkin > > ___ > sqlite-users mailing list > sqlite-users@mailinglists.sqlite.org > https://urldefense.proofpoint.com/v2/url?u=http-3A__mailinglists.sqlite.org_cgi-2Dbin_mailman_listinfo_sqlite-2Dusers=DwIGaQ=hmGTLOph1qd_VnCqj81HzEWkDaxmYdIWRBdoFggzhj8=l90GvhOo_5uKc2d8JIuoVtb0fH4diec3z4TsA-hoNTc=m2M1vgITLsaAq32oeWR3t3BL5zfQYJkiHqNZ17uZtSk=sCLCkHRvR-ztdvVVSGxqaiz1a_tcrqNlHTio4zORCuE= > > ___ > sqlite-users mailing list > sqlite-users@mailinglists.sqlite.org > http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users > ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] sqlite3_limit equivalent in System.Data.SQLite.dll
Keith Bertram wrote: > > The default limit for the number of attached databases appears to be 10 with the > 1.0.106 version of System.Data.SQLite.dll and I would like to increase this value > to 25. I've used the sqlite3_limit function in the past to increase this value > but I don't see a matching way to do this within System.Data.SQLite.dll. > Thanks for pointing this out. I'll make sure that some way to accomplish this ends up in the 1.0.112.0 release, which is due out shortly. -- Joe Mistachkin ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] System.Data.SQLite.EF6 feature request: Timespan support
I’ll look into adding this type mapping to System.Data.SQLite. Sent from my iPhone > On Aug 19, 2019, at 7:19 PM, Barry wrote: > > A project I work on runs mainly on SQL Server, but there are times we want > to be able to create the same data model in SQLite for portability. > > We mostly use EF6 to access the database; we have a code-first approach and > write custom scripts to generate the database schema. > > We have a custom ConnectionFactory to determine whether a new database > context should use a SQLiteConnection or SQLServerConnection. (Yes it's > deprecated but it works...) > > This was working well until we added a TimeSpan field to one of our > entities. Now we get an exception on model creation: There is no store type > corresponding to the EDM type 'Edm.Time' of primitive type 'Time'. > > I know it would be possible for us to store the Ticks or TotalSeconds of > the TimeSpan in a SQLite INTEGER or REAL field, but we've already got > deployments using the TimeSpan field on SQLServer and would rather avoid > having to change that schema. > > Would it be possible for a future version of SQLite to support TimeSpan > mapping in the entity framework? > > Thanks in advance, > > - Barry Smith > ___ > sqlite-users mailing list > sqlite-users@mailinglists.sqlite.org > http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users > ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] System.Data.SQLite.dll.config in final build
Eric Kundl wrote: > > Using VS and SQLite (from NuGet pkg). > What version of Visual Studio and NuGet are you using? > > After the 'build' of the solution/project, the file > System.Data.SQLite.dll.config is included in the bin\release folder. > I have not seen this behavior before. Are you manually customizing the MSBuild files for the project? > > It has a note in it: do not copy this file to any of the build output > directories > Generally, it's not supposed to be in those directories. Is it causing any issues when loading the native SQLite interop assembly? -- Joe Mistachkin ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] using System.Data.SQLite on Linux / ".Net Core 2"
Yes. Currently, there are binaries that support Windows, Linux, and MacOS in the “System.Data.SQLite.Core” NuGet package: https://www.nuget.org/packages/System.Data.SQLite.Core Sent from my iPhone > On Jul 21, 2019, at 1:27 PM, Larry Brasfield > wrote: > > Is there a build of System.Data.SQLite which runs on .Net Core 2.0 when > used on a Linux platform? > > Using Powershell 6 installed on my Ubuntu 16 LTS box, I can do >Add-Type -Path ./System.Data.SQLite.dll > (which loads the assembly) without issues, (on Linux or Windows), but this >$c = New-Object System.Data.SQLite.SQLiteConnection -ArgumentList "Data > Source=$home/silly.sdb" > fails with error information reading: > New-Object : Exception calling ".ctor" with "1" argument(s): "Unable to > load shared library 'SQLite.Interop.dll' or one of its dependencies. In > order to help diagnose loading problems, consider setting the LD_DEBUG > environment variable: libSQLite.Interop.dll: cannot open shared object > file: No such file or directory" > At line:1 char:6 > + $c = New-Object System.Data.SQLite.SQLiteConnection -ArgumentList "Da ... > + > + CategoryInfo : InvalidOperation: (:) [New-Object], > MethodInvocationException > + FullyQualifiedErrorId : > ConstructorInvokedThrowException,Microsoft.PowerShell.Commands.NewObjectCommand > > I imagine that I need the interop DLL from the Mono build mixed with the > System.Data.SQLite assembly which targets .Net Core 2.0, but it is unclear > (to me) how to set this up. > > Any insights are most welcome. > ___ > sqlite-users mailing list > sqlite-users@mailinglists.sqlite.org > http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users > ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] Exception in SQLite.dll (1.0.111.0)
Vishruth H V wrote: > > I have been using the System.Data.SQLite.dll (1.0.111.0) and > System.Data.SQLite.Linq.dll (1.0.111.0) assemblies in my .NET Framework 3.5 > SP1 application. SQLite database has 4 tables in it. Each table will be > inserted with more than 50 data at once. When the data for all the tables > is inserted for more than 20 times continuously, > *System.AccessViolationException: > Attempted to read or write protected memory. This is often an indication > that other memory is corrupt error* will occur and data will not be saved > to database. > Do you have a stack trace where the exception is thrown? Are you using the pre-built binaries available for download on the web site or binaries that you built locally? If built locally, can you provide the build logs? Is your application multithreaded? If so, are you using System.Data.SQLite on more than one thread? Further, are you making sure that all objects that belong to a connection opened on a given thread X are not references on any other threads at the same time (including SQLiteCommand, SQLiteDataReader, et al)? -- Joe Mistachkin ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
[sqlite] System.Data.SQLite version 1.0.111.0 released
System.Data.SQLite version 1.0.111.0 (with SQLite 3.28.0) is now available on the System.Data.SQLite website: https://system.data.sqlite.org/ Further information about this release can be seen at: https://system.data.sqlite.org/index.html/doc/trunk/www/news.wiki Please post on the SQLite mailing list (sqlite-users at mailinglists.sqlite.org) if you encounter any problems with this release. -- Joe Mistachkin ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] Best way to set default PRAGMA's in System.Data.SQLite
Sam Carleton wrote: > > I am trying out this approach right now and running into one minor issue, > the following cmd only builds the debug version: > > msbuild SQLite.NET.2015.MSBuild.sln /p:UseSqliteStandard=true > /p:UseInteropDll=false > Have you tried using the "build.bat" tool in the source tree? It sets up the right build environment for the solution. The following commands should do generally what you want: CD /D C:\full\path\to\sqlite\dotnet\Setup SET MSBUILD_ARGS=/p:UseSqliteStandard=true /p:UseInteropDll=false CALL build.bat ReleaseManagedOnly -- Joe Mistachkin ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] Best way to set default PRAGMA's in System.Data.SQLite
Sam Carleton wrote: > > Ok, that is good to know. If I am not mistaken, System.Data.SQLite takes > part in the .Net connection pooling, What is the best way to ensure that > these two features are set correctly? Does the program simply need to make > sure it issues the pragma after each connection, assuming it is always new? > System.Data.SQLite actually handles its own connection pooling. In order to use it, you'll want to add "Pooling=True;" to your connection strings. Yes, the program will need to make sure it issues the PRAGMA statements for each connection. > > I do use SQLite in C/C++ application where I have recompiled SQLite DLL to > force these settings. In looking through the .net code, it looks like it > simply a wrapper around the SQLite dll, Is it possible to have the .Net > application simply use that version of the DLL rather than the one that > came with System.Data.SQLite? > Yes, there are several ways to do this. One way is to simply compile the System.Data.SQLite assembly in such a way that it uses a "standard" SQLite DLL, via setting the following MSBuild properties: /p:UseSqliteStandard=true /p:UseInteropDll=false It should be noted that System.Data.SQLite requires several SQLite options be enabled at compile-time to operate correctly, including but not limited to: SQLITE_ENABLE_COLUMN_METADATA=1;SQLITE_THREADSAFE=1; Alternatively, you can use the default set of MSBuild properties and then customize the source code for "SQLite.Interop.dll", e.g. in the "interp.c" source code file. -- Joe Mistachkin ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] Best way to set default PRAGMA's in System.Data.SQLite
Sam Carleton wrote: > > My .net application which uses System.Data.SQLite relies on the > foreign_keys to be enabled and recursive_trigger to be disabled. In my > searching, I found documentation on DefaultFlags_SQLiteConnection, setting > that in the appSettings. Here is what it says: > In order to do this, you'll want to execute the PRAGMA statements against the connections that you open prior to running other SQL. The flags for the connection (primarily) control the behavior of System.Data.SQLite and they (generally) have no relation to PRAGMA statements. -- Joe Mistachkin ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] Odd exception when creating a connection object
Barry Roberts wrote: > > Unfortunately the problem seems to be very difficult to replicate reliably. > Generally we are seeing around about a 5% failure rate at application start. > Any further info, ask away. > So far, I've been unable to reproduce the problematic behavior. I've added some new tests that create 20 threads, with each thread creating a lot of connections (1000). So far, I have not seen this exception thrown. Approximately how many threads are creating connections simultaneously? What is the target operating system and .NET Framework version? Are you able to compile a build of System.Data.SQLite locally? On trunk, I've added the ability to disable the SQLiteLog subsystem using a new environment variable ('No_SQLiteLog'). Are you able to test the effects of this enhancement in your environment? -- Joe Mistachkin ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] Odd exception when creating a connection object
Barry Roberts wrote: > > InvalidOperationException: code = Misuse (21), message = > System.Data.SQLite.SQLiteException (0x87EF): bad parameter or other API > misuse > Are you using multiple AppDomains? Do you have other threads in the process accessing SQLite via its native API while the connections are being created? Any details you could provide in order to reproduce this could be useful. -- Joe Mistachkin ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] What is the most commonly used file extension for sqlite3 database files?
Am 23.03.2019 um 17:06 schrieb Peng Yu: Hi, I see a variety of extensions for sqlite3 database files, such as .db, .db3, .sqlite3 and .sq3. Is there a most commonly used/accepted convention for the extension? Thanks. In the DatenBurg Environment, "*.sqlite" is used. ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
[sqlite] System.Data.SQLite version 1.0.110.0 released
System.Data.SQLite version 1.0.110.0 (with SQLite 3.27.2) is now available on the System.Data.SQLite website: https://system.data.sqlite.org/ Further information about this release can be seen at: https://system.data.sqlite.org/index.html/doc/trunk/www/news.wiki Please post on the SQLite mailing list (sqlite-users at mailinglists.sqlite.org) if you encounter any problems with this release. -- Joe Mistachkin ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
[sqlite] Final preparations for the release of System.Data.SQLite v1.0.110.0 have begun...
If you have any issues with the current trunk code, please report them via this mailing list (and/or by creating a ticket on "https://system.data.sqlite.org/;) prior to Friday, February 22nd. Thanks. -- Joe Mistachkin ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] Support for System.Data.SQLite: Different API type for int/integer columns
JP wrote: > > The answers don't explain why there is a bitness difference at run-time > between the types retrieved from INT and INTEGER columns, and that's my > question. From reading https://sqlite.org/datatype3.html I understand > there should be no difference whatsoever between defining a column INT > or INTEGER (other than whether a primary key may become a rowid alias). > System.Data.SQLite maps type names to their associated types. Mappings can be overridden on a per-connection basis. By default, INT maps to a 32-bit integer and INTEGER maps to a 64-bit integer, mostly for reasons of backward compatibility. In order to customize the mappings, the flag UseConnectionTypes should be used when opening the connection -AND- the AddTypeMapping method is used to override a built-in mapping of the same name (e.g. "INT"). -- Joe Mistachkin ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
[sqlite] Documentation error
I think this is an error in the command line documentation or room for minor improvement. I was reading through the docs trying to learn about the command line tool and ran into a snag, so i thought i'd report it. https://www.sqlite.org/cli.html In section 3 where it talks about dot commands and in section 7, it refers to *.indexes* as a command you can run from the SQLite command line tool, but when i try that i get an error message. Instead i do see an *.indices *command that appears to do the same thing. I installed Python3.6.5 in Centos 7 and the version they had with it is this: sqlite> .version SQLite 3.7.17 2013-05-20 00:56:22 118a3b35693b134d56ebd780123b7fd6f1497668 This version appears to be the latest version using yum on my Centos7 VM. Long story short is that this may be i'm using an old version of sqlite lite and the command has changed. Request: If the documentation is wrong, update it to say .indices instead of .indexes. or Request: If the documentation is accurate, update the docs with a note that older versions of sqlite referred to the .indexes command as .indices thanks, Joe Jacobs ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] Problem using System.data.SQLite
Schuhmacher, Bernd wrote: > > I am trying to put up a little program using System.data.SQLite with C# > under Visual Studio 2017. The Target Framework is dotnet core 2.0 > I imported the nuget Package (Project - manage nuget Package ...) into > the Project. > The compilation works fine. But if running the compiled program I get > an error: System.IO.FileNotFoundException: "Could not load file or > assembly 'System.Data.SQLite, Version=1.0.109.0, Culture=neutral, > PublicKeyToken=db937bc2d44ff139'. Das System kann die angegebene Datei > nicht finden." > The NuGet package "System.Data.SQLite.x64" contains binaries that have not been tested with .NET Core. In fact, since it uses the mixed-mode assembly, I sincerely doubt it can ever work with .NET Core as they do not support those, e.g.: https://github.com/dotnet/coreclr/issues/18013 Instead, the NuGet package "System.Data.SQLite.Core" should be used; unfortunately, due to assembly deployment issues with .NET Core, it is not as simple as it could be: https://system.data.sqlite.org/index.html/info/67d10c4262d45d26 I'm not quite sure how to address deployment these issues in a portable (and supported) way. It appears that I may need to figure out a way to automatically update the JSON file associated with the application, but that does not seem like the most elegant solution. -- Joe Mistachkin ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
[sqlite] How to find records in a table which are not in a second table?
A (perhaps silly ) beginners question: My sqlite database contains several tables, two of them, table A and table B, have text colums called 'nam'. The tables have about 2 millions lines. What's the most efficient way to select all lines from table A with nam values, which are not present in the nam values of table B? Thanks -- Joe ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] Next release
Roger Schlueter wrote: > > What about System.Data.SQLite? > I would estimate that the next System.Data.SQLite release, which will include SQLite 3.25, will be released within two to three weeks after SQLite 3.25 itself is released, barring an unforeseen complications. -- Joe Mistachkin ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
[sqlite] System.Data.SQLite version 1.0.109.0 released
System.Data.SQLite version 1.0.109.0 (with SQLite 3.24.0) is now available on the System.Data.SQLite website: https://system.data.sqlite.org/ Further information about this release can be seen at: https://system.data.sqlite.org/index.html/doc/trunk/www/news.wiki This release features full support for .NET Core v2.0 on Windows, macOS, and Linux. The .NET Framework v4.7.2 and Mono v5.12 are also supported. Please post on the SQLite mailing list (sqlite-users at mailinglists.sqlite.org) if you encounter any problems with this release. -- Joe Mistachkin ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] Exception at changing a row in .NET FW 4.7.1
Using the type name “DATETIME” with System.Data.SQLite activates some special handling, which is quite complex, since it has many options dealing with formats, time zone handling, etc. In your case, it may be better to use INTEGER instead. Alternatively, you could create a custom type handler, but that seems like overkill. Sent from my iPhone > On Aug 8, 2018, at 7:06 PM, Rtm Rbtsk wrote: > > > Rtm Rbtsk wrote: > > > > > > If I change the data in the first row with the 'id'='1' in the table > > > 'leslie', I get a DBConcurrencyException at the Update-command: > > > > > > System.Data.DBConcurrencyException: 'Concurrency violation: the > > > UpdateCommand affected 0 of the expected 1 records.' > > > > > > > It's hard to say what exactly is happening without seeing the C# code > > involved; however, in the past, these types of issues have been caused > > by a mismatch between how the .NET Framework and SQLite treat typing > > of column values and/or a mismatch between the data type used in the > > query and the one actually stored in the database file. > > > > -- > > Joe Mistachkin > > The source is below. > The cell column 'birthdate' of type NUMERIC has the value > '63487539487534432'. I found out that if you only set this value to NULL, the > Concurrency Exception will not appear anymore. > > Further if I enter a new value, it suddenly seems to round this: > > If I enter > 75987492387429362, > 75987492387429400 is displayed after load > > If I enter > 64230380287363183, > 64230380287363200 is displayed after load > > If I enter > 92376465128590338, > 92376465128590400 is displayed after load and so on. But the first value is > actually saved in DB. > > The data type of the column in DataGridView is either Int64 or Decimal. But > both can contain higher values than those mentioned. > > Rtm Rbtsk wrote: > > > > > > If I change the data in the first row with the 'id'='1' in the table > > > 'leslie', I get a DBConcurrencyException at the Update-command: > > > > > > System.Data.DBConcurrencyException: 'Concurrency violation: the > > > UpdateCommand affected 0 of the expected 1 records.' > > > > > > > It's hard to say what exactly is happening without seeing the C# code > > involved; however, in the past, these types of issues have been caused > > by a mismatch between how the .NET Framework and SQLite treat typing > > of column values and/or a mismatch between the data type used in the > > query and the one actually stored in the database file. > > > > -- > > Joe Mistachkin > > The source is below. > The cell column 'birthdate' of type NUMERIC has the value > '63487539487534432'. I found out that if you only set this value to NULL, the > Concurrency Exception will not appear anymore. > > Further if I enter a new value, it suddenly seems to round this: > > If I enter > 75987492387429362, > 75987492387429400 is displayed after load > > If I enter > 64230380287363183, > 64230380287363200 is displayed after load > > If I enter > 92376465128590338, > 92376465128590400 is displayed after load and so on. But the first value is > actually saved in DB. > > The data type of the column in DataGridView is either Int64 or Decimal. But > both can contain higher values than those mentioned. > > I will probably not use NUMERIC in my projects, but I'm concerned that such > failures may happen in other situations. > > Best, > Artem > > > using System; > using System.Collections.Generic; > using System.ComponentModel; > using System.Data; > using System.Drawing; > using System.Linq; > using System.Text; > using System.Threading.Tasks; > using System.Windows.Forms; > using System.Data.SQLite; > using System.Text.RegularExpressions; > > namespace SQLite_Test > { > public partial class Form1 : Form > { > public static readonly string nl = Environment.NewLine; > SQLiteConnection PubConLite; > public static BindingSource _BS_Source2 = new BindingSource(); > public static SQLiteDataAdapter sql_ada2; public static DataSet > Datenset = new DataSet(); > public static DataTable dtLeslie = new DataTable("ZweiteTabelle"); > > public Form1() > { > InitializeComponent(); > } > > private void Form1_Load(object sender, EventArgs e) > { > dtLeslie.Clear(); > Datenset.Tables.Add(dtLeslie); > _BS_Source2.DataSource = Datenset.Tables["ZweiteTabelle"]
Re: [sqlite] Exception at changing a row in .NET FW 4.7.1
Rtm Rbtsk wrote: > > If I change the data in the first row with the 'id'='1' in the table > 'leslie', I get a DBConcurrencyException at the Update-command: > > System.Data.DBConcurrencyException: 'Concurrency violation: the > UpdateCommand affected 0 of the expected 1 records.' > It's hard to say what exactly is happening without seeing the C# code involved; however, in the past, these types of issues have been caused by a mismatch between how the .NET Framework and SQLite treat typing of column values and/or a mismatch between the data type used in the query and the one actually stored in the database file. -- Joe Mistachkin ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] Different behavior of .NET client 1.0.108.0SQLiteDataAdapter / DataReader on literal int values in select list.
mi...@willyschwabe.de wrote: > > i found out, that the following select statement produces different > schemata in DataTable when using SQLiteDataAdapter.Fill and data > rows are returned or not returned from the SELECT statement. > > SELECT 1 AS literal FROM anTable WHERE 1<1 > Since no rows are returend, there is no type information available based on the value of the returned data (as there is no data). -- Joe Mistachkin ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] Need a document/link or suggestion
sudeep singh wrote: > > Currently we are using sql-net-pcl nuget package ( > https://www.nuget.org/packages/sqlite-net-pcl/) to insert the data. Now, my > task is to encrypt the same data using SEE. > I've never used (or worked on) the "SQLite-net-pcl" project before; however, it appears to support use of SEE via compiling a native custom native SQLite DLL with SEE support enabled, which can be accomplished following the instructions here: https://www.sqlite.org/see/doc/trunk/www/readme.wiki After the DLL is compiled, it should be renamed to "sqlite3" (for Windows) or "libsqlite3" (for other operating systems). This should allow the Mono and/or .NET to find it. I assume it will need to be located in the same directory as the managed "SQLite-net-pcl" assemblies. -- Joe Mistachkin ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] System.Data.SQLite version 1.0.108 - .NET 2.0 no service pack compatibility
It may work without Service Pack 2; however, it has not been tested in that configuration. Sent from my iPhone > On Jun 20, 2018, at 7:45 AM, Bianchi Lorenzo > wrote: > > Hi everybody, > > We are currently using the SQlite.dll version 1.0.98 x86 for .NET 2.0, and it > seems to be working also on old PCs with .NET 2.0 basic, without Service > Pack. We are thinking to upgrade to version 1.0.108 since it has support for > both x86 and x64, but I don't know if Service Pack 2 for .NET 2.0 is required > for this version or not. Can you help me? > > Thanks in advance, > Lorenzo. > ___ > sqlite-users mailing list > sqlite-users@mailinglists.sqlite.org > http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users > ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
[sqlite] Final preparations for the release of System.Data.SQLite v1.0.109.0 have begun...
If you have any issues with the current trunk code, please report them via this mailing list (and/or by creating a ticket on "https://system.data.sqlite.org/;) prior to next Monday, June 4th. Thanks. -- Joe Mistachkin ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
[sqlite] System.Data.SQLite version 1.0.108.0 released
System.Data.SQLite version 1.0.108.0 (with SQLite 3.22.0) is now available on the System.Data.SQLite website: https://system.data.sqlite.org/ Further information about this release can be seen at: https://system.data.sqlite.org/index.html/doc/trunk/www/news.wiki Please post on the SQLite mailing list (sqlite-users at mailinglists.sqlite.org) if you encounter any problems with this release. -- Joe Mistachkin ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] not able to save log to sqlite
Abhijit Dass wrote: > > i want to logging exception details to sqlite database using > Nlog libraries, m okay when i store logging details by using > ado.net code but m not able to insert log details when i use > nlog.config. please help me out how can i insert logging > details by nlog.config. > I have not used this component; however, is there some reason why the file name in the connection string is prefixed with a dollar sign? > > connectionString="Data > Source=$C:\Users\abhijitd\Desktop\Test\Log.db3;Version=3;" > Also, the connection string must use "Data Source", with a space between the words. I'm not sure if the space is be preserved in your config file. -- Joe Mistachkin ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
[sqlite] Final preparations for the release of System.Data.SQLite v1.0.108.0 have begun...
If you have any issues with the current trunk code, please report them via this mailing list (and/or by creating a ticket on "https://system.data.sqlite.org/;) prior to this Wednesday, February 28th. Thanks. -- Joe Mistachkin ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] Using Sqlite nuget package in a .Net test assembly
Greg Pagendam-Turner wrote: > > Using Sqlite nugget package version 3.13 > Are you using the full (desktop) .NET Framework? If so, the NuGet package you probably want is probably "System.Data.SQLite". -- Joe Mistachkin ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] invalid date time
Cezary H. Noweta wrote: > > Use ``Flags=GetAllAsText'' when creating a SQLiteConnection. > Excellent suggestion. Alternatively, you could use the GetString method on the SQLiteDataReader class. The GetValue method, by design, refers to the table schema so that it can convert the requested value into the declared type (which I assume is DateTime in this case). -- Joe Mistachkin ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
[sqlite] System.Data.SQLite version 1.0.107.0 released
System.Data.SQLite version 1.0.107.0 (with SQLite 3.22.0) is now available on the System.Data.SQLite website: https://system.data.sqlite.org/ Further information about this release can be seen at: https://system.data.sqlite.org/index.html/doc/trunk/www/news.wiki Please post on the SQLite mailing list (sqlite-users at mailinglists.sqlite.org) if you encounter any problems with this release. -- Joe Mistachkin @ https://urn.to/r/mistachkin ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] SQLite 3.22.0: Precompiled Windows 64-bit DLL is 32-bit?
Stanley Jacob wrote: > > With 3.22.0, this produces "ImportError: DLL load failed: %1 is not a > valid Win32 application." > With 3.21.0, there is no error. > Thanks for the report. It should be the x64 version now. -- Joe Mistachkin ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
[sqlite] Final preparations for the release of System.Data.SQLite v1.0.107.0 have begun...
If you have any issues with the current trunk code, please report them via this mailing list (and/or by creating a ticket on "https://system.data.sqlite.org/;) prior to Friday, January 26th. Thanks. -- Joe Mistachkin ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] Compilation failure for sqlite3_analyzer
Tony Papadimitriou wrote: > > sqlite3_analyzer.c(207289): fatal error C1083: Cannot open include file: > 'tcl.h': No such file or directory > By default, the Makefile for MSVC will now look for the Tcl include files within the "compat\tcl\include" sub-directory in the source tree. There are now two ways to build the targets that require Tcl: 1. To continue using the previous hard-coded default Tcl directory, add the argument "TCLDIR=C:\Tcl" to the nmake command line. 2. Use something like the following commands in order to link the "compat\tcl" directory within the source tree to the "C:\Tcl" directory (via an NTFS junction): CD /D C:\path\to\sqlite\compat MKLINK /J tcl C:\Tcl -- Joe Mistachkin ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] An issue with System.Data.SQLite
Aleksey Lulchenko wrote: > > Please, give me the clues what is going wrong, if you can. I think it > is a typical bug in many situations. > Could you please show us the schema of the table (or tables) involved? -- Joe Mistachkin ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] Cross-compiling fails.
Alastair Growcott wrote: > > Cross-compiling sqlite3 fails due to the use of binaries in the > build process that are generated during the build process. > Specifically: > You'll need to use the NMAKE macro XCOMPILE. Also, depending on target platform you may need to use the other NMAKE macros like USE_NATIVE_LIBPATHS, NCRTLIBPATH, and NSDKLIBPATH. For example, nmake /f Makefile.msc sqlite3.exe XCOMPILE=1 USE_NATIVE_LIBPATHS=1 Alternatively, you can build the amalgamation source code file "sqlite3.c" without cross-compiling and then cross-compile it. -- Joe Mistachkin @ https://urn.to/r/mistachkin ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] Need SQLite datafiles to be locked on OS level(Windows)
Simon Slavin wrote: > > I'm hoping that Joe Mistachkin, or someone else who understands > that library sees this, just to check that it works the way > you're expecting it to. > Judging from the description so far, I think that both SQLite and System.Data.SQLite are working correctly. It is true that System.Data.SQLite has an internal retry mechanism that will wait 150ms between retries. The PrepareRetries property for the SQLiteConnection object is the maximum number of retries. By default, it is 3, which means the total wait should be around 450ms by default. That being said, I have not personally seen any built-in Windows application or system service prevent SQLite from access a file for more than a fraction of a second. Maybe things are different if the Windows AV subsystem actually finds something "bad" in the file? -- Joe Mistachkin ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] Need SQLite datafiles to be locked on OS level(Windows)
Richard Damon wrote: > > A basic rule is that even if you don't think anyone else might be > accessing a file, you need to allow for a temporary failure to lock a > file for writting, and retry several times with a timeout. > Yes, the Win32 VFS does this. However, the original poster may wish to increase the default retry values using the SQLITE_FCNTL_WIN32_AV_RETRY file control with the sqlite3_file_control() function, see: https://www.sqlite.org/c3ref/c_fcntl_begin_atomic_write.html -- Joe Mistachkin @ https://urn.to/r/mistachkin ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
[sqlite] System.Data.SQLite version 1.0.106.0 released
System.Data.SQLite version 1.0.106.0 (with SQLite 3.21.0) is now available on the System.Data.SQLite website: https://system.data.sqlite.org/ Further information about this release can be seen at: https://system.data.sqlite.org/index.html/doc/trunk/www/news.wiki Please post on the SQLite mailing list (sqlite-users at sqlite.org) if you encounter any problems with this release. -- Joe Mistachkin @ https://urn.to/r/mistachkin ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
[sqlite] System.Data.SQLite version 1.0.106.0 pre-release packages now available
Pre-release packages of System.Data.SQLite version 1.0.106.0 are now available on the System.Data.SQLite website: https://system.data.sqlite.org/ Please click on the "Pre-Release Download" link in order to view the available pre-release packages. Further information about this upcoming release can be seen at: https://system.data.sqlite.org/index.html/doc/trunk/www/news.wiki Please post on the SQLite mailing list (sqlite-users at sqlite.org) if you encounter any problems with these pre-release packages. -- Joe Mistachkin @ https://urn.to/r/mistachkin ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] TR: Database base disk is malformed issue
Jean-François RIGHI wrote: > > 1) We were working with an old version of System.data.sqlite.dll (1.0.66) > wich was prety stable. But we needed to work with concat index (CREATE > INDEX IDX ON TABLE_1 (FIELD1 || FIELD2) to upgrade performance. Since we > changed the dll we often got a Database base disk is malformed issue. We > can repair the base via an sql dump of the base. The issue itself is never > exactly the same : we can have a duplicate TRIGGER or TABLE or sometimes > INSERT INTO with non valide data. > Are you able to share the full schema for the database? -- Joe Mistachkin @ https://urn.to/r/mistachkin ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] Join, Union, Subquery or what?
Am 06.09.2017 um 14:32 schrieb R Smith: These suggestions from Clemens will work exactly as you want, but I need to add that it assumes the records all perfectly match between the tables, even flags, ID column etc. This means, if it doesn't work as you expect, you can still use the exact same methods but you can of course include the relevant columns (that should or shouldn't match between tables) in stead of the * wildcard. As an example based on Clemens' first example, the query: SELECT DDatum FROM Katalog EXCEPT SELECT DDatum FROM ZKatalog; will produce a list of all dates in Katalog that doesn't have a corresponding date in ZKatalog. Cheers, Ryan On 2017/09/06 1:09 PM, Clemens Ladisch wrote: Joe wrote: my SQLite database has two tables Katalog and ZKatalog with the same structure. One of the columns is called DDatum. What's the most efficient way to (1) Select records, which are only in Katalog, but not in ZKatalog? SELECT * FROM Katalog EXCEPT SELECT * FROM ZKatalog; (2) Select records, which are in Katalog and in ZKatalog? SELECT * FROM Katalog INTERSECT SELECT * FROM ZKatalog; SELECT * FROM Katalog UNION SELECT * FROM ZKatalog; (depending on the exact meaning of the word "and" in your question) (3) Select records, which are with same column values except DDatum in Katalog and in ZKatalog? SELECT * FROM Katalog WHERE the_primary_key_column IN ( SELECT the_primary_key_column FROM ( SELECT all,columns,except,ddatum FROM Katalog INTERSECT SELECT all,columns,except,ddatum FROM ZKatalog ) ); (If you do not need the DDatum values, use only the inner subquery.) (4) Select records from Katalog and ZKatalog with same DDatum content? SELECT * FROM Katalog WHERE DDatum IN (SELECT DDatum FROM ZKatalog); Regards, Clemens ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users . Clemens and Ryan, this helps a lot. Thank you -- Joe ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
[sqlite] Join, Union, Subquery or what?
Hi, all, my SQLite database has two tables Katalog and ZKatalog with the same structure. One of the columns is called DDatum. What's the most efficient way to (1) Select records, which are only in Katalog, but not in ZKatalog? (2) Select records, which are in Katalog and in ZKatalog? (3) Select records, which are with same column values except DDatum in Katalog and in ZKatalog? (4) Select records from Katalog and ZKatalog with same DDatum content? Thanx -- Joe ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
[sqlite] System.Data.SQLite version 1.0.105.2 released
System.Data.SQLite version 1.0.105.2 (with SQLite 3.19.3) is now available on the System.Data.SQLite website: https://system.data.sqlite.org/ Further information about this release can be seen at: https://system.data.sqlite.org/index.html/doc/trunk/www/news.wiki Please post on the SQLite mailing list (sqlite-users at sqlite.org) if you encounter any problems with this release. -- Joe Mistachkin @ https://urn.to/r/mistachkin ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] SQLiteBlob.Create failing "No RowId is available"
Another note: The GUID column will need to be marked as UNIQUE or PRIMARY KEY in the CREATE TABLE statement in order for the BLOB lookup to work properly. -- Joe Mistachkin @ https://urn.to/r/mistachkin ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] SQLiteBlob.Create failing "No RowId is available"
Sergio Capozzi wrote: > > It seems the KeyInfo calculation is doing something wrong. > Is there a workaround or is a known bug? > Version 1.0.105.1 > Thanks for the report. This should now be fixed on trunk. -- Joe Mistachkin @ https://urn.to/r/mistachkin ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] Memory Issue - GLOBs and Windows Active Mapped File
Have you tried using the command "PRAGMA mmap_size=0;" on the connection? https://www.sqlite.org/pragma.html#pragma_mmap_size -- Joe Mistachkin @ https://urn.to/r/mistachkin ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
[sqlite] System.Data.SQLite version 1.0.105.1 released
System.Data.SQLite version 1.0.105.1 (with SQLite 3.18.0) is now available on the System.Data.SQLite website: https://system.data.sqlite.org/ Further information about this release can be seen at: https://system.data.sqlite.org/index.html/doc/trunk/www/news.wiki Please post on the SQLite mailing list (sqlite-users at sqlite.org) if you encounter any problems with this release. -- Joe Mistachkin @ https://urn.to/r/mistachkin ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] Bug causing MSVC to fail to compile Session Extension from the amalgamation
Zachary Greve wrote: > > When using MSVC to compile the SQLite library, several errors pop up > about differing linkage definitions of several session extension > functions. These functions are declared without the SQLITE_API macro, > but are implemented with it. MSVC does not like this and fails the > compilation. > Thanks for the report. This should now be fixed on trunk. -- Joe Mistachkin @ https://urn.to/r/mistachkin ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
[sqlite] System.Data.SQLite version 1.0.105.0 released
System.Data.SQLite version 1.0.105.0 (with SQLite 3.18.0) is now available on the System.Data.SQLite website: https://system.data.sqlite.org/ Further information about this release can be seen at: https://system.data.sqlite.org/index.html/doc/trunk/www/news.wiki Please post on the SQLite mailing list (sqlite-users at sqlite.org) if you encounter any problems with this release. -- Joe Mistachkin @ https://urn.to/r/mistachkin ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] Selecting from view with System.Data.SQLite throws
What is the declared data type for the column? Also, what are the raw values for the first row? You may want to use the SQLite command line tool to query the database for them. Sent from my iPhone https://urn.to/r/mistachkin > On Apr 8, 2017, at 12:55 PM, Joseph L. Casale> wrote: > > I am using System.Data.SQLite.Core 1.0.104 in vs2017 with .NET 4.6.2 > and trying to select from a view. The query is valid and does return data > manually, however the reader throws an index out of range exception > when accessing the first row result. > > Anything atypical needed when querying a view? > > Thanks, > jlc > ___ > sqlite-users mailing list > sqlite-users@mailinglists.sqlite.org > http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users > ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] Visual Studio 2015 Express C# LoadExtension() not working?
I can think of one possibility offhand: The application is running as 32-bit and the extension DLL is 64-bit (or vice-versa). Sent from my iPhone https://urn.to/r/mistachkin > On Mar 17, 2017, at 5:02 PM, Phil Pollockwrote: > > I can't get the LoadExtension() function to work under Visual Studio 2015 > Express C#. I have tried to load several extensions that do work under the > SQLite console but they will not load under C#. So I created the minimal > example of an example extension given on sqlite.org using the half.c source. > It loaded and worked under the SQLite console but failed to load it in a > simple C# program with the code snippets shown here: > > > ... > > using System.Data.SQLite; > ... > >SQLiteConnection m_dbConnection; > > ... > >string str_extension_path = @"C:\Users\Admin\Documents\Visual Studio > 2015\Projects\half_ext\half.sqlext"; > > ... > >string str_DB_Connect = "Data Source=" + > textBox_DBPath.Text.ToString() + "; Version=3;"; >m_dbConnection = new SQLiteConnection(str_DB_Connect); >m_dbConnection.Open(); >m_dbConnection.EnableExtensions(true); >m_dbConnection.LoadExtension(str_extension_path); > ... > > The program had this exception when the .LoadExtension() executed: > > "An unhandled exception of type 'System.Data.SQLite.SQLiteException' occurred > in System.Data.SQLite.dllexception > Additional information: SQL logic error or missing database > > The specified module could not be found." > > I've tried many other approaches, for example, using SELECT > load_extension('half.sqlext'), and rebuilt everything in x86 and x64 but to > no avail. > > Does anyone have a working example with source of an extension and a working > VS 2015 C# program that loads it? Or doesn't this feature work. > > TNX > > ___ > sqlite-users mailing list > sqlite-users@mailinglists.sqlite.org > http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users > ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] Bug? Incorrect use of SQLITE_DEFAULT_CACHE_SIZE
Detlef Golze wrote: > > This code still assumes that SQLITE_WIN32_CACHE_SIZE is measured in pages: > The value of SQLITE_WIN32_HEAP_INIT_SIZE is an initial estimate of the eventual heap size. It does not have to be an exact figure. Using either KiB or pages normally ends up giving a fairly reasonable value. Alternatively, it can be overridden at compile-time. -- Joe Mistachkin @ https://urn.to/r/mistachkin ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] Bug? Incorrect use of SQLITE_DEFAULT_CACHE_SIZE
Detlef Golze wrote: > > Changes carried forward from version 3.12.0 (2016-03-29): > Ah, right. I was reading the comments in the source code. I've checked-in some changes that should prevent integer overflows when very large values are used for the SQLITE_DEFAULT_CACHE_SIZE and/or SQLITE_DEFAULT_PAGE_SIZE defines. -- Joe Mistachkin @ https://urn.to/r/mistachkin ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] Bug? Incorrect use of SQLITE_DEFAULT_CACHE_SIZE
Detlef Golze wrote: > > SQLITE_DEFAULT_CACHE_SIZE is defined as page size if positive or > Kbyte if negative. > The SQLITE_DEFAULT_CACHE_SIZE value is always measured in pages. > > I came here because I got an integer overflow in the definition > of SQLITE_WIN32_HEAP_INIT_SIZE. > What values are you using for the SQLITE_DEFAULT_CACHE_SIZE and SQLITE_DEFAULT_PAGE_SIZE defines? -- Joe Mistachkin @ https://urn.to/r/mistachkin ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] Retrieve INTEGER PRIMARY KEY
Clyde Eisenbeis wrote: > > using (System.Data.SQLite.SQLiteConnection sqliteConnection = new > System.Data.SQLite.SQLiteConnection("Data Source=" + stPathFilename + > ";")) { > using (System.Data.SQLite.SQLiteCommand sqliteCmd = > sqliteConnection.CreateCommand()) { > ... > sqliteCmd.CommandText = "INSERT INTO ..." > ... > sqliteCmd.ExecuteNonQuery(); > sqliteCmd.CommandText = "SELECT last_insert_rowid()"; > int iKeyID = (int)sqliteCmd.ExecuteScalar(); > > End up with an exception: "Specified cast is not valid." > Changing the type of iKeyID to "long" should make it work, e.g.: long iKeyID = (long)sqliteCmd.ExecuteScalar(); Alternatively, you should also be able to use the LastInsertRowId property of the SQLiteConnection object, e.g.: long iKeyID = sqliteConnection.LastInsertRowId; -- Joe Mistachkin @ https://urn.to/r/mistachkin ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] SQLite3 Pros / Cons
Random Coder wrote: > > And in case it's not obvious: System.Data.Sqlite _is_ sqlite3 > To clarify and expand upon the above reply: System.Data.SQLite is an ADO.NET based managed wrapper around the SQLite. It includes the SQLite core library, compiled with a few extra options and loadable extensions, and some extra code to help it integrate better with the .NET Framework. The file name for the native portions of System.Data.SQLite (also known as the "interop assembly") is typically "SQLite.Interop.dll" (i.e. this file name is used instead of "sqlite3.dll" by the P/Invoke integration). -- Joe Mistachkin @ https://urn.to/r/mistachkin ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] Using SQLite, how can I search for chars that include a ', similar to OLE DB .Parameters?
Clyde Eisenbeis wrote: > > I can't read CHM docs. > I'm somewhat curious about that. Anyhow, there are alternatives: 1. IntelliSense in the Visual Studio IDE (this requires the XML file "System.Data.SQLite.xml", which should have been included with your DLL). 2. Read the XML documentation comments in the source code. 3. Use the "Doc\buildChm.tcl" tool in the source tree (it requires NDoc3 and Tcl). It will *ALSO* generate the raw HTML files. > > I'd appreciate some example code which uses "sqlite3_bind_". > Thanks! > When using System.Data.SQLite, you won't be using those native APIs directly. Numerous examples may be found at: https://stackoverflow.com/ Some good keywords to search for include "System.Data.SQLite", "SQLiteParameter", "SQLiteCommand", "SQLiteConnection", "SQLiteDataReader", etc. -- Joe Mistachkin @ https://urn.to/r/mistachkin ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] Using SQLite, how can I search for chars that include a ', similar to OLE DB .Parameters?
Clyde Eisenbeis wrote: > > It appears that sqlite3 is not part of System.Data.SQLite. > Actually, it is. However, the managed components provide a "wrapper" around the core library functionality. The documentation, in Windows CHM format, is available here: https://urn.to/r/sds_docs The primary classes you'll want to look into include SQLiteConnection, SQLiteCommand, SQLiteParameter, and SQLiteDataReader. -- Joe Mistachkin @ https://urn.to/r/mistachkin ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
[sqlite] View column data type affinity?
Is there a way when creating a view to specify the data type affinity for each column? ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
[sqlite] System.Data.SQLite version 1.0.104.0 released
System.Data.SQLite version 1.0.104.0 (with SQLite 3.15.2) is now available on the System.Data.SQLite website: https://system.data.sqlite.org/ Further information about this release can be seen at: https://system.data.sqlite.org/index.html/doc/trunk/www/news.wiki Please post on the SQLite mailing list (sqlite-users at sqlite.org) if you encounter any problems with this release. -- Joe Mistachkin @ https://urn.to/r/mistachkin ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
[sqlite] Final preparations for the release of System.Data.SQLite v1.0.104.0 have begun...
If you have any issues with the current trunk code, please report them via this mailing list (and/or by creating a ticket on "https://system.data.sqlite.org/;) prior to Monday, December 12th. Thanks. -- Joe Mistachkin ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] Parallel access to read only in memory database
Daniel Meyer wrote: > > How can we allow many reader threads on an in memory, write once read many > times database and achieve multi-core performance? Is this possible with > sqlite? > Have you tried using the URI "file::memory:?cache=shared" with one of the sqlite3_open*() C APIs? Further details on using URI file names may be found here: https://www.sqlite.org/uri.html -- Joe Mistachkin @ https://urn.to/r/mistachkin ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] [System.Data.SQLite] Using sqlite3.dll instead of Interop.dll - what's the trade-off?
John Reynolds wrote: > > My question is: what are the trade-offs of not using > SQLite.Interop.dll? > There are various compile-options and extensions baked into the "SQLite.Interop.dll" that are not enabled and/or included by default with "sqlite3.dll". One that is somewhat important, is the "vtshim" extension. It is required if you want to implement a virtual table in managed code. It's also fairly tightly integrated into the resulting "SQLite.Interop.dll", by necessity. It is possible to compile the "SQLite.Interop.dll" for Linux, Mac OS X, and probably other POSIX compliant systems, using the following build script: https://urn.to/r/7C -- Joe Mistachkin @ https://urn.to/r/mistachkin ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
[sqlite] System.Data.SQLite version 1.0.103.0 released
System.Data.SQLite version 1.0.103.0 (with SQLite 3.14.2) is now available on the System.Data.SQLite website: https://system.data.sqlite.org/ Further information about this release can be seen at: https://system.data.sqlite.org/index.html/doc/trunk/www/news.wiki Please post on the SQLite mailing list (sqlite-users at sqlite.org) if you encounter any problems with this release. -- Joe Mistachkin @ https://urn.to/r/mistachkin ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
[sqlite] Final preparations for the release of System.Data.SQLite v1.0.103.0 have begun...
If you have any issues with the current code, please report them via this mailing list (and/or by creating a ticket on "https://system.data.sqlite.org/;) prior to Monday, August 29th. Thanks. -- Joe Mistachkin ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] SQLite in VS2015 Server Explorer (Bugs)
Scott Robison wrote: > > I'm sure the responsible party will see this and reply shortly with > something definitive. > This is the right place and the System.Data.SQLite design-time components are supported here. That being said, the design-time components for System.Data.SQLite are supported on a "best effort" basis, mostly because: 1. They were never fully completed. 2. The Visual Studio extensibility interfaces they use are very fragile and scarcely documented. 3. Debugging them is nefariously difficult. -- Joe Mistachkin @ https://urn.to/r/mistachkin ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] Failed to install Microsoft Visual C++ Runtime
Zehev Spitz wrote: > > > Failed to install Microsoft Visual C++ Runteim: vcredist_x86_2015_VSU2.exe, > Another version of this product is already installed. Installation of this > version cannot conitnue. To configure or remove the existing version of this > product, use Add/Remove Programs on the Control Panel. > Do you have the setup logs handy for this error? They could help us to resolve the issue in the future setup packages. The setup itself already has a check for the error codes that are documented to be used for this particular situation; however, there must (?) be (at least) one that is new (to Visual Studio 2015). -- Joe Mistachkin ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
[sqlite] SqliteDataAdapter fill wrong data when select data from database
When I use sqlite ado.net, I met a bug made me confused. My table schema and data is like this. Table name is "a". IDTEXT DOUBLE 1 AA 1 2 BB 1.2 3 CC 2 When I run SQL statement("select * from a"); I got double column's data is 1 1 2, and column dataType is system.Int64(Long) the 1.2 converted to 1. this make me got wrong value. But, if table is like this. IDTEXT DOUBLE 1 AA 1.3 2 BB 1.5 3 CC 2 I got double column's data is 1.3 1.5 2, and column dataType is double the dataType and correct value is very import for us. I can not create a dataTable that defined tableschema, because the select result is can not prediction. I can not know how many columns and column's data type will be return. Please try this. If this is a bug, please fixed it as soon as possible. If this is not a bug, can you give me a way to get correct value and column type ? ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] UNIQUE constraint violation
On 6/29/2016 6:13 AM, R Smith wrote: Very happy this is sorted for you. Note that Synchronous=OFF should only ever be used on a read-only DB (or at least one where writing only happens when you the user/DB Admin actively makes changes via queries. For anything that should run autonomously, Synchronous should preferably be FULL and at least be ON. There is a time-penalty to be paid for Synchronous=FULL, but if it isn't part of a user interface and no user to notice that specific thread is lagging a second or two when writing, then it rarely matters. Okay, thanks. I thought it was generally preferable to use "lower" levels of synchronous. I am not using WAL, so I'll use FULL rather than NORMAL. Seems like I lucked out in the table being corrupted, but recoverable. Is there a simple explanation as to why your query to find duplicates worked correctly, despite the corrupted index, whereas the one I had used did not? Does it mean that your query doesn't use the index? Joe ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] UNIQUE constraint violation
On 6/29/2016 1:04 AM, R Smith wrote: These are the duplicate records. This index is associated with a UNIQUE constraint on the original table. Is there a way to clean it up? That means your DB is corrupted by some method. It's not bad yet, just missing Index entries. Make a copy of the database file, then try to delete those rows and recreate all indices with: DELETE FROM eventlog WHERE row_id IN (18029,18030,18031,18032,18033,18034,18035); REINDEX; PRAGMA integrity_check; If you do not delete the rows, it can't re-index because the Unique Index constraint will fail since the rows are not unique. If this worked, test all tables and queries. Be sure to have that backup at hand - once integrity is broken, the DB state is not secure until integrity check passes. PS: Nice catch Simon - I did not even consider a broken index. I've never had an SQLite file go corrupt on me, even though using many SQLite DBs in all our systems, even as application file formats, so I'm always a bit oblivious to that possibility. starting from the original, corrupted DB... integrity_check row 18029 missing from index sqlite_autoindex_EventLog_1 row 18030 missing from index sqlite_autoindex_EventLog_1 row 18031 missing from index sqlite_autoindex_EventLog_1 row 18032 missing from index sqlite_autoindex_EventLog_1 row 18033 missing from index sqlite_autoindex_EventLog_1 row 18034 missing from index sqlite_autoindex_EventLog_1 row 18035 missing from index sqlite_autoindex_EventLog_1 wrong # of entries in index sqlite_autoindex_EventLog_1 delete from eventlog where rowid >=18029 and rowid <= 18035 (checked integrity again here, and got same result as above) reindex integrity_check ok vacuum integrity_check ok Query for duplicates returns no records. Thanks very much, Ryan and Simon. My application monitors wind turbines, and there are somewhat frequent power issues at the sites. At one particular site, I had frequent corruption on server crashes, but none since changing SYNCHRONOUS from OFF to NORMAL. This particular site still had SYNCHRONOUS OFF, but will now have NORMAL. Joe ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] UNIQUE constraint violation
On 6/28/2016 4:52 PM, Simon Slavin wrote: On 28 Jun 2016, at 11:22pm, Joe Pasquariello <j...@fenway.com> wrote: select rowid, device, hex(device), localtime, udatetime from eventlog where device like '%M14' and udatetime=1415000934 rowiddevicehex(device)localtimeudatetime 18031M144D31342014-11-03 01:48:541415000934 18062M144D31342014-11-03 01:48:541415000934 (2) select rowid, device, hex(device), udatetime from eventlog where device like '%M14' and udatetime=1415000934 rowiddevicehex(device)udatetime 18062M144D31341415000934 SELECT udatetime,typeof(udatetime),udatetime-1415000934 FROM eventlog where device like '%M14' and udatetime=1415000934 udatetimetypeof(udatetime)udatetime-1415000934 1415000934integer0 PRAGMA integrity_check integrity_check row 18029 missing from index sqlite_autoindex_EventLog_1 row 18030 missing from index sqlite_autoindex_EventLog_1 row 18031 missing from index sqlite_autoindex_EventLog_1 row 18032 missing from index sqlite_autoindex_EventLog_1 row 18033 missing from index sqlite_autoindex_EventLog_1 row 18034 missing from index sqlite_autoindex_EventLog_1 row 18035 missing from index sqlite_autoindex_EventLog_1 wrong # of entries in index sqlite_autoindex_EventLog_1 These are the duplicate records. This index is associated with a UNIQUE constraint on the original table. Is there a way to clean it up? Simon. ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users -- Joe Pasquariello Fenway Systems, LLC 2980 College Ave, Suite 7 Berkeley, CA 94705 510-665-4355 j...@fenway.com ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] UNIQUE constraint violation
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 other doesn't. Perhaps I should not be using "localtime" as a field name. I know it's a modifier to strftime(). (1) select rowid, device, hex(device), localtime, udatetime from eventlog where device like '%M14' and udatetime=1415000934 rowiddevicehex(device)localtimeudatetime 18031M144D31342014-11-03 01:48:541415000934 18062M144D31342014-11-03 01:48:541415000934 (2) select rowid, device, hex(device), udatetime from eventlog where device like '%M14' and udatetime=1415000934 rowiddevicehex(device)udatetime 18062M144D31341415000934 ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] UNIQUE constraint violation
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 be without the NOCASE collations. Thanks. I just changed my account settings so that instead of getting only the digest, I get the individual emails. That seems to be required if one wants to post and reply. Regarding the failure of my StackOverflow-sourced query to find duplicates, it seems you're right. Somehow, the two "device" values shown in the table below are not the same, and I have no idea why. I get both rows if I select where device like '%M14', but I get only one row if select where device='M14', yet length(device) is 3 for both. Hm. rowiddevicelocaltime type code text udatetime jdatetime 18031M14 2014-11-03 01:48:54E 0Failurefree system14150009342456964.825625 18062M14 2014-11-03 01:48:54E 0Failurefree system14150009342456964.825625 ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users -- Joe Pasquariello Fenway Systems, LLC 2980 College Ave, Suite 7 Berkeley, CA 94705 510-665-4355 j...@fenway.com ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
[sqlite] UNIQUE constraint violation
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: SELECT A.* FROM EventLog AS A JOIN EventLog AS B ON B.udatetime=A.udatetime AND B.device=A.device AND B.code=A.code AND B.type=A.type WHERE B.row_id <> A.row_id Any row that shows up is a duplicate that would violate that Unique Index. Further to this, I'm not sure if you omitted the other fields for brevity or to explain the problem, but that INSERT query should never work since you specify all those columns as NOT NULL, then you do not give it DEFAULT values, and then you omit them from the INSERT, which means it must fail on the NOT NULL constraint. If this is not the case, and the above query doesn't show up any rows, and the constraint still fails - mind letting us have a copy of the DB file that produces that violation? Cheers, Ryan 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 view your response and reply somewhere other than Nabble? To create this email, I copied and pasted from Nabble. I'm afraid it will show up as a new topic. There has to be a better way. To the point, your query to find duplicate records showed there were some duplicates after all. I removed the duplicates and the SQL as shown in my original post worked. I don't know what you mean about the insert statement being incorrect. It explicitly sets all fields in the new table except rowid. My understanding was that since rowid is INTEGER PRIMARY KEY, inserts to the new table would get new rowid values, in the order inserted, which is what I want, and it seems to be doing that correctly. The query I was using to find duplicates is one that I found on StackOverflow. I'm very new to SQL. Can you tell me why this query returns no records while yours does? If I change the last clause to having count(*)=1, the result has the same number of rows as the table. I thought that meant it was doing what I wanted, but obviously it doesn't. select udatetime,device,localtime,code,type,text,0 as status, count(*) as the_count from eventlog group by udatetime,device,code,type,status having count(*) > 1 > On 2016/06/28 9:37 PM, Joe Pasquariello wrote: > 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 UNIQUE constraint for the new table. I assume this means > there is a row in the existing table that violates the constraint > imposed on the new table, but I've queried the existing table for rows > that would violate the constraint, and I don't find any. Is there > something else that could cause the violation? > > Thanks, > > Joe > > BEGIN TRANSACTION; > DROP TABLE IF EXISTS TempEventLog; > ALTER TABLE EventLog RENAME TO TempEventLog; > > CREATE TABLE IF NOT EXISTS EventLog( > rowid INTEGER PRIMARY KEY, > udatetime INTEGERNOT NULL, > deviceCHAR(16) NOT NULL COLLATE NOCASE, > localtime CHAR(32) NOT NULL COLLATE NOCASE, > code INTEGERNOT NULL, > type CHAR(16) NOT NULL COLLATE NOCASE, > text CHAR(64) NOT NULL COLLATE NOCASE, > statusINTEGERNOT NULL, > UNIQUE(udatetime,device,code,type,status) > ); > > CREATE INDEX IF NOT EXISTS i_udatetime ON EventLog(udatetime); > CREATE INDEX IF NOT EXISTS i_code ON EventLog(code); > CREATE INDEX IF NOT EXISTS i_device_code ON EventLog(device,code); > > INSERT OR ROLLBACK INTO EventLog ( > udatetime, device, localtime, code, type, text, status ) > SELECT udatetime, device, localtime, code, type, text, 0 > FROM TempEventLog ORDER BY rowid; > > DROP TABLE TempEventLog; > PRAGMA user_version = 1; > COMMIT; > > > > ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
[sqlite] UNIQUE constraint violation
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 UNIQUE constraint for the new table. I assume this means there is a row in the existing table that violates the constraint imposed on the new table, but I've queried the existing table for rows that would violate the constraint, and I don't find any. Is there something else that could cause the violation? Thanks, Joe BEGIN TRANSACTION; DROP TABLE IF EXISTS TempEventLog; ALTER TABLE EventLog RENAME TO TempEventLog; CREATE TABLE IF NOT EXISTS EventLog( rowid INTEGER PRIMARY KEY, udatetime INTEGERNOT NULL, deviceCHAR(16) NOT NULL COLLATE NOCASE, localtime CHAR(32) NOT NULL COLLATE NOCASE, code INTEGERNOT NULL, type CHAR(16) NOT NULL COLLATE NOCASE, text CHAR(64) NOT NULL COLLATE NOCASE, statusINTEGERNOT NULL, UNIQUE(udatetime,device,code,type,status) ); CREATE INDEX IF NOT EXISTS i_udatetime ON EventLog(udatetime); CREATE INDEX IF NOT EXISTS i_code ON EventLog(code); CREATE INDEX IF NOT EXISTS i_device_code ON EventLog(device,code); INSERT OR ROLLBACK INTO EventLog ( udatetime, device, localtime, code, type, text, status ) SELECT udatetime, device, localtime, code, type, text, 0 FROM TempEventLog ORDER BY rowid; DROP TABLE TempEventLog; PRAGMA user_version = 1; COMMIT; -- Joe Pasquariello Fenway Systems, LLC 2980 College Ave, Suite 7 Berkeley, CA 94705 510-665-4355 j...@fenway.com ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
[sqlite] System.Data.SQLite version 1.0.102.0 released
System.Data.SQLite version 1.0.102.0 (with SQLite 3.13.0) is now available on the System.Data.SQLite website: https://system.data.sqlite.org/ Further information about this release can be seen at: https://system.data.sqlite.org/index.html/doc/trunk/www/news.wiki Please post on the SQLite mailing list (sqlite-users at sqlite.org) if you encounter any problems with this release. -- Joe Mistachkin ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] [System.Data.SQLite] Nuget 3 support
Jann Roder wrote: > > Nuget 3 now seems to have much better support for native libraries. > I'd really like to use this for System.Data.SQLite. I suspect this will require a great deal of investigation, refactoring, and debugging. It's too late in the release cycle for 1.0.102.0 for this. I'll look into it for 1.0.103.0. -- Joe Mistachkin ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] [sqlite-dev] Final preparations for the release of System.Data.SQLite v1.0.102.0 have begun...
Eric Sink wrote: > > The next time April 15th falls on a Friday is 2022, so I guess we have plenty > of time. > Actually, it did say Monday, June 20th before I sent it; however, my mail client is apparently acting up. -- Joe Mistachkin ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
[sqlite] Final preparations for the release of System.Data.SQLite v1.0.102.0 have begun...
If you have any issues with the current code, please report them via this mailing list (and/or by creating a ticket on "https://system.data.sqlite.org/;) prior to Friday, April 15th. Thanks. -- Joe Mistachkin ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] Can't find PInvoke DLL 'SQLite.Interop.101.dll'.
Nigel Walton wrote: > > Can't find PInvoke DLL 'SQLite.Interop.101.dll'. > PID:01FD0185 TID:057E0022 testce.EXE > MissingMethodException > Can't find PInvoke DLL 'SQLite.Interop.101.dll'. > Do you have the appropriate MSVC runtime ("MSVCR110.DLL") installed? -- Joe Mistachkin ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] Fwd: System.Data.SQLite support incremental_vacuum
Ondra Medek wrote: > > Does .NET version support the "incremental_vacuum" feature or am I > doing something wrong? I am sure no other connection to the db exists > at the time the SQL command/query is issued. > Yes; however, the database "auto_vacuum" mode must be set to "incremental" first, per: https://www.sqlite.org/pragma.html#pragma_incremental_vacuum -- Joe Mistachkin ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] sqlite built as Multithread
Jozef Knotek > > I am struggling with building SQLite as Multithread > (-DSQLITE_THREADSAFE=2<http://www.sqlite.org/compile.html#threadsafe>). > For various reasons, using -DSQLITE_THREADSAFE=2 with System.Data.SQLite is not recommended. Only -DSQLITE_THREADSAFE=1 should be used with native SQLite libraries that need to work with System.Data.SQLite. -- Joe Mistachkin ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users