These environment variables are used to control several features of the System.Data.SQLite library. All of these environment variables are optional. If a particular environment variable is not present, the XML configuration file "System.Data.SQLite.dll.config" in the directory containing the currently executing assembly (i.e. the one containing all the managed components for System.Data.SQLite) will also be consulted. If present, the XML configuration file should be structured as follows:
<?xml version="1.0"?> <configuration> <appSettings> <add key="A_Setting" value="String Value" /> <add key="Another_Setting" value="%ENV_VALUE%" /> </appSettings> </configuration>
All references to existing environment variables will be expanded to their corresponding values within the returned settings values unless either the "No_Expand" or "No_Expand_<name>" environment variable is set [to anything].
None of these environment variables are supported by the Compact Framework builds of System.Data.SQLite, due to limitations imposed by the platform itself; however, the XML configuration file mentioned above may be used instead.
Name | Description |
---|---|
Force_SQLiteLog | If this environment variable is set [to anything], the SQLite logging subsystem may be initialized in a non-default application domain. By default, this is not allowed due to the potential for application domain unloading issues. |
No_PreLoadSQLite | If this environment variable is set [to anything], the native library pre-loading code will be disabled. By default, the native library pre-loading code will attempt to load the native SQLite library from architecture-specific (e.g. "x86", "amd64", "x64") or platform-specific (e.g. "Win32") directories that reside underneath the application base directory. |
No_SQLiteConnectionNewParser | If this environment variable is set [to anything], the new connection string parsing algorithm will not be used. This environment variable is intended for use with legacy code only. |
No_SQLiteFunctions | If this environment variable is set [to anything], the initial search for types in all loaded assemblies that are tagged with the SQLiteFunction attribute will be skipped. Normally, this search is conducted only once per application domain by the static constructor of the SQLiteFunction class; however, these implementation details are subject to change. |
PreLoadSQLite_BaseDirectory | If this environment variable is set [to anything], it will be used instead of the application base directory by the native library pre-loader. This environment variable can be especially useful in ASP.NET and other hosted environments where direct control of the location of the managed assemblies is not under the control of the application. |
PreLoadSQLite_ProcessorArchitecture | If this environment variable is set [to anything], it will be used instead of the processor architecture value contained in the PROCESSOR_ARCHITECTURE environment variable to help build the path of the native library to pre-load. |
PreLoadSQLite_NoSearchForDirectory | If this environment variable is set [to anything], the native library pre-loading code will skip conducting a search for the native library to pre-load. By default, the search starts in the location of the currently executing assembly (i.e. the assembly containing all the managed components for System.Data.SQLite) and then falls back to the application domain base directory. |
PreLoadSQLite_UseAssemblyDirectory | If this environment variable is set [to anything], the location of the currently executing assembly (i.e. the one containing all the managed components for System.Data.SQLite) will be used as the basis for locating the the native library to pre-load (i.e. instead of using the application domain base directory). |
PROCESSOR_ARCHITECTURE | This environment variable is normally set by the operating system itself and should reflect the native processor architecture of the current process (e.g. a 32-bit x86 application running on a 64-bit x64 operating system should have the value "x86"). |
TypeName_SQLiteProviderServices | If this environment variable is set [to anything], it will be used by the System.Data.SQLite.SQLiteFactory class as the type name containing the System.Data.Common.DbProviderServices implementation that should be used. |
Use_SQLiteConvert_DefaultDbType | If this environment variable is set [to anything], it will be used by the System.Data.SQLite.SQLiteConvert class as the default DbType value that should be used when a per-connection value is not available. |
Use_SQLiteConvert_DefaultTypeName | If this environment variable is set [to anything], it will be used by the System.Data.SQLite.SQLiteConvert class as the default type name that should be used when a per-connection value is not available. |