SQLite Forum

System.Data.SQLite version 1.0.118.0 released
Login

System.Data.SQLite version 1.0.118.0 released

(1) By mistachkin on 2023-06-11 23:43:48 [link] [source]

System.Data.SQLite version 1.0.118.0 (with SQLite 3.42.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 this forum if you encounter any problems with this release.

(2) By Aask (AAsk1902) on 2023-06-12 10:43:46 in reply to 1 [link] [source]

Support for sqlite3_trace_v2 is being added for the next release of System.Data.SQLite

This is a quick note to confirm that version 1.0.118.0 has support for sqlite3_trace_v2.

(3) By mistachkin on 2023-06-12 15:00:10 in reply to 2 [link] [source]

Yes, it has been added.

(4) By anonymous on 2023-06-14 16:25:15 in reply to 1 [source]

Hello,

I would like to report an issue with version 1.0.118 that is happening only on Windows and only when building single file deployments (i.e. -p:PublishSingleFile=true).

Unhandled exception. System.ArgumentNullException: Value cannot be null. (Parameter 'path1')
   at System.ArgumentNullException.Throw(String paramName)
   at System.IO.Path.Combine(String path1, String path2)
   at System.Data.SQLite.SQLiteConnection..ctor(String connectionString, Boolean parseViaFramework)
   at System.Data.SQLite.SQLiteConnection..ctor(String connectionString)
...

The code which generates the issue is this:

SQLiteConnectionStringBuilder csb = new SQLiteConnectionStringBuilder {
         DataSource = @"C:\Users\Luc\AppData\Roaming\VRS\sto\vrs.sto",
         Version = 3,
         BusyTimeout = 2500,
         ForeignKeys = true,
         DateTimeFormat = SQLiteDateFormats.ISO8601
      };
SQLiteConnection connection = new SQLiteConnection(csb.ConnectionString); //  The above mentioned exception is thrown here

I just tested again previous versions 1.0.117 and 1.0.116, they are both OK on any OS and with any kind of deployment type. I didn't test other versions now, but I never encountered this kind of issue before. For the moment the only solution for me was to roll back to 1.0.117.

Also, with 1.0.118:

  • there are no issues on Linux even when building single file deployments
  • there are no issues on Windows if not publishing single file deployments

Thank you for your time reading this, please let me know if I could help with more information.

Wishing you an excellent day,

Luc


> dotnet --info
.NET SDK:
 Version:   7.0.304
 Commit:    7e794e2806

Runtime Environment:
 OS Name:     Windows
 OS Version:  10.0.19045
 OS Platform: Windows
 RID:         win10-x64
 Base Path:   C:\Program Files\dotnet\sdk\7.0.304\

Host:
  Version:      7.0.7
  Architecture: x64
  Commit:       5b20af47d9

.NET SDKs installed:
  7.0.304 [C:\Program Files\dotnet\sdk]

.NET runtimes installed:
  Microsoft.AspNetCore.App 7.0.7 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 7.0.7 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.WindowsDesktop.App 7.0.7 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]

Other architectures found:
  None

Environment variables:
  Not set

global.json file:
  Not found

(5) By anonymous on 2023-06-14 20:15:09 in reply to 4 [link] [source]

I have exactly the same problem. I had to roll back to version 117.

Everything works in debug mode.

As soon as we send to release with PublishSingleFile, the program doesn't start. Can't connect to the database.

(6) By mistachkin on 2023-06-15 21:06:31 in reply to 4 [link] [source]

This appears to be caused by path issues that are triggered by the
"PublishSingleFile" option.

For now, setting the "SQLite_NoConfigure" environment variable (to anything)
should prevent the issue from being seen.

(7) By anonymous on 2023-06-16 06:57:26 in reply to 6 [link] [source]

Can you be more specific about where and how it should be prescribed? There is nothing on the internet about such a variable.

(8) By Chris Locke (chrisjlocke1) on 2023-06-16 09:23:11 in reply to 7 [link] [source]

From a DOS prompt (as the same user as your application is running) you can type

set SQLite_NoConfigure=1

You can confirm this has been set by simply typing

set

which will list all environment variables, or

set SQLite_NoConfigure

which will list just the one.

(9) By anonymous on 2023-06-16 10:01:50 in reply to 8 [link] [source]

So all software users should be told to write the variables into the system? I think it's up to the developers of the Sqlite module to fix something in the code.

(10) By Stephan Beal (stephan) on 2023-06-16 10:14:46 in reply to 9 [link] [source]

I think it's up to the developers of the Sqlite module to fix something in the code.

Joe wrote:

For now, setting the "SQLite_NoConfigure" environment variable...

"For now" being equivalent to "this is a workaround until a better solution can be implemented."

(11) By Chris Locke (chrisjlocke1) on 2023-06-16 11:47:41 in reply to 9 [link] [source]

And until the developers fix the something, the variables in the system allows the software to continue. Thats good, no? Its a better solution than having the software unusable.

(20) By anonymous on 2023-10-01 21:22:46 in reply to 6 [link] [source]

Are there any downsides in using SQLite_NoConfigure? It suggest that something will not be configured and missing, but I could not find anything not working after applying this.

(12) By anonymous on 2023-06-17 11:29:58 in reply to 4 [link] [source]

I also have the same problem.

Went back to version 1.0.117.

"Set SQLite_NoConfigure=1" is NOT a valid option. I do not want my users saddle with that. Many of them are IT ignorant.

(13) By Chris Locke (chrisjlocke1) on 2023-06-17 14:24:24 in reply to 12 [link] [source]

Your application can set an environment variable. This isn't something your users would have to do.

But meh - you have a workaround, so just need to wait until 1.0.119. I assume 1.0.118 has no extra benefits for you over 1.0.117 .. ie, it's no great loss?

(14) By mistachkin on 2023-06-17 14:45:17 in reply to 12 [link] [source]

Obviously, you can use any version you like; however, setting the environment
variable can be easily (and harmlessly) done from within the application as
well, e.g.:

    System.Environment.SetEnvironmentVariable(
        "SQLite_NoConfigure", "1");

(15) By anonymous on 2023-06-18 13:06:06 in reply to 14 [link] [source]

Setting the Environment Variable "SQLite_NoConfigure=1" unfortunately does not work for me.

It does not take away the error.

So in any case went back again to version 1.0.117.0, hoping this issue will be fixed in the next version.

(16) By mistachkin on 2023-06-18 14:43:56 in reply to 15 [link] [source]

The "SQLite_NoConfigure" environment variable would need to be set before
attempting any usage of the SQLiteConnection class.

(17) By anonymous on 2023-06-18 17:39:37 in reply to 16 [link] [source]

I know. I have tested this on my own PC and I have set the environment variable in a DOS prompt even before starting the application where SQLiteConnections are used in. Notice that searching the internet I didn't find that environment variable (SQLite_NoConfigure) anywhere.

(18) By anonymous on 2023-06-18 17:55:49 in reply to 17 [link] [source]

It's working now.

I've set the environment variable in my windows desktop application (.net 7, C#11, wpf) at the beginning of the file App.xaml.cs.

No longer database issues with version 1.0.118.0 of System.Data.SQLite.

Thank you.

(19) By anonymous on 2023-06-23 18:24:57 in reply to 4 [link] [source]

Same issue, SQLite works fine with normal builds but breaks while building a single file application.

20:17:55  CRIT
Value cannot be null. (Parameter 'path1')
   at System.IO.Path.Combine(String path1, String path2)
   at System.Data.SQLite.SQLiteConnection..ctor(String connectionString, Boolean parseViaFramework)
   at System.Data.SQLite.SQLiteConnection..ctor(String connectionString)