System.Data.SQLite
Check-in [de983e0ab7]
Not logged in

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Improvements to the README file.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:de983e0ab7b284e9ebd09fba30193180825e6c35
User & Date: mistachkin 2014-01-13 03:12:11
Context
2014-01-14
08:33
Be more precise about the reference assemblies linked with the design-time package. Fix for [3faa78bc35]. check-in: 650344341e user: mistachkin tags: trunk
2014-01-13
03:14
Merge updates from trunk. check-in: ba04fdc873 user: mistachkin tags: ef6
03:12
Improvements to the README file. check-in: de983e0ab7 user: mistachkin tags: trunk
2014-01-09
09:53
Pickup upstream Eagle fixes for CacheDictionary and NetFx40 GetHashCode performance issues. check-in: 08dac619aa user: mistachkin tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to readme.htm.

132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
...
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172


173
174



175
176










177
178
179
180
181
182
183





184







185
186
187
188
189
190
191
....
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
....
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
....
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
....
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
....
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
<h2><strong>Design-Time Support</strong></h2>
<p>
Download and run one of the setup packages and then select the
&quot;<b>Install the designer components for Visual Studio 20XX.</b>&quot;
option when prompted.
</p>
<h2>
<strong>DbFactory Support (Non-Compact Framework)</strong></h2>
In order to use the SQLiteFactory and have the SQLite data provider enumerated in
the DbProviderFactories methods, you must add the following segment into your application's
app.config file:<br />
<pre>
&lt;configuration&gt;
    &lt;system.data&gt;
        &lt;DbProviderFactories&gt;
................................................................................
&lt;/configuration&gt;
</pre>
<p>
See the help documentation for further details on implementing both version-specific
(GAC enabled) and version independent DBProviderFactories support.
</p>

<h2>Compiling for the Compact Framework</h2>

<p>
Just change the target platform from Win32 to Compact Framework and recompile.&nbsp;
<strong>The Compact Framework has no support for enumerating attributes in an assembly,
therefore all user-defined collating sequences and functions must be explicitly
registered.</strong>&nbsp; See the <strong>testce</strong> sample application for
an example of how to explicitly register user-defined collating sequences and functions.</p>

<h2><b><a name="redist"></a>Distributing The SQLite Engine and ADO.NET Assembly</b></h2>

<p>
On the desktop, only the <strong>System.Data.SQLite.DLL</strong> file needs to be
distributed with your application(s).&nbsp; This DLL contains both the managed wrapper


and the native SQLite3 codebase.&nbsp; For the Compact Framework, you will have
to distribute both the CF version of System.Data.SQLite.DLL, as well as the SQLite.Interop.XXX.DLL.&nbsp;



This is a breaking change as of 1.0.59.0.&nbsp; Recent Windows Mobile frameworks
are not supporting the mixed CF assembly I was building prior to this version.</p>











<h2><b>Development Notes Regarding the SQLite 3 Source Code</b></h2>

<p>
The core SQLite engine is compiled directly from the unmodified source code available
at the sqlite.org website.&nbsp; Several additional pieces are compiled on top of
it to extend its functionality, but the core engine's source is not changed.</p>





<p>







</p>

<h2><b>Version History</b></h2>

<p>
    <b>1.0.91.0 - February XX, 2014 <font color="red">(release scheduled)</font></b>
</p>
................................................................................
<li>Code merge with SQLite 3.3.4</li><li>Fixed an encryption bug when changing the
password of databases over 1gb in size.&nbsp;</li><li>Fixed various designer issues
related to construction of named parameters.</li>
<li>Retooled the GetSchema() method of SQLiteDataReader to use the new 3.3.4 API
functions, and made several enhancements and fixes to schemas.&nbsp;</li>
<li>Implemented the SourceColumnNullMapping property of SQLiteParameter to fix a
DbCommandBuilder code generation bug.&nbsp;</li><li>Removed the runtime dependency
on MSVCR80.DLL.&nbsp; File size is somewhat larger for the varying desktop versions.</li><li>
Created an install program to manage installation and uninstallation of the SQLite
design-time support.</li>
<li>Designer support now works for all Visual Studio editions, including all Express
Editions.</li>
<li>Design-time installer will now remove (if present) the machine.config SQLite
entries in favor of installing the xml code into the devenv.exe.config file (or
any of the variations for express editions).&nbsp; The officially-accepted behavior
................................................................................
<p>
<b>1.0.24.5 beta - January 20, 2006</b></p>
<ul>
<li>This beta is built from sqlite.org's 3.3.1 alpha and contains development-in-progress
code.&nbsp; Therefore no guarantees can be made regarding its suitability for production
use.</li>
<li><strong>You no longer need to distribute 2 files on the CompactFramework.&nbsp;
You can delete SQLite.Interop.DLL entirely.&nbsp; </strong>I wrote a custom tool
called "mergebin" (available in the source zip file) which combines the two libraries
and gets around a glaring defect in the VS2005 linker for ARM processors which doesn't
allow you to link netmodules.</li>
<li><strong>x64 and ia64 builds now use the same strong name as the x86 build.</strong>&nbsp;
This means breaking backward compatibility, but it was necessary in order to allow
you to drop any of those 3 builds onto a PC and have your .NET program run properly.&nbsp;
Prior to this, you'd get an error if you built your program using the x86 build,
................................................................................
been previously prepared and a Prepare() function is called (and the command is
associated with a connection) or just prior to the command being executed.&nbsp;</li></ul>
</div>
<p>
<b>1.0.11 - August 1, 2005</b><br />
</p>
<ul>
<li><strong>For everything except the Compact Framework, System.Data.SQLite.DLL
is now the <em>only</em> DLL required to use this provider!</strong>&nbsp; The assembly
is now a multi-module assembly, containing both the native SQLite3 codebase and
the C# classes built on top of it.&nbsp; The Compact Framework version (when completed)
will not be able to support this feature, so backwards compatibility with the Compact
Framework has been preserved for the future.
<li>Fixed a bug in SQLiteCommand.ExecuteScalar() that caused it to stop executing
commands once it obtained the first column of the first row-returning resultset.&nbsp;
................................................................................
the parameters to be out of whack. </li>
</ul>
<p>
<b>1.0.09a - May 25, 2005</b><br />
</p>
<ul>
<li>Fixed a broken helpfile and corrected some obsolete help remarks in SQLiteFunction.cs
<li>Added a version resource to the SQLite.Interop.DLL.&nbsp;</li></ul>
<p>
<b>1.0.09 - May 24, 2005</b><br />
</p>
<ul>
<li>Code merge with the latest 3.21 version of SQLite.
<li>Removed obsolete methods and properties for Whidbey Beta 2</li></ul>
<p>
................................................................................
<li>Fixed the SQLite3 C# class step/reset functions to accomodate schema changes
that invalidate a prepared statement.&nbsp; Statements are recompiled transparently.
<li>Moved all native DLL declarations to an UnsafeNativeMethods class.
<li>Split several classes into their own modules for readability.
<li>Renamed many internal variables, reviewed access to variables marked as internal
and altered their protection levels accordingly.
<li>Due to the presence of the altered sqlite3 codebase and so many added interop
functions, I decided to rename the sqlite3 C project and the DLL to SQLite.Interop.DLL.&nbsp;
This is the same core sqlite3 codebase but designed specifically for this ADO.NET
provider.&nbsp; This eliminates any possibility of someone dropping another build
of sqlite3.dll into the system and rendering the provider inoperable.&nbsp; In the
future if the folks at sqlite.org finally introduce a method of retrieving column
usage for an arbitrary prepared statement, I'll retool this library to be a lightweight
function call wrapper around the core binary distribution.
<li>Added [SuppressUnmanagedCodeSecurity] attribute to the UnsafeNativeMethods class







|







 







|








|


|
|
>
>
|
<
>
>
>
|
<
>
>
>
>
>
>
>
>
>
>

|


<
<
<
>
>
>
>
>

>
>
>
>
>
>
>







 







|







 







|







 







|







 







|







 







|







132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
...
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175

176
177
178
179

180
181
182
183
184
185
186
187
188
189
190
191
192
193



194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
....
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
....
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
....
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
....
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
....
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
<h2><strong>Design-Time Support</strong></h2>
<p>
Download and run one of the setup packages and then select the
&quot;<b>Install the designer components for Visual Studio 20XX.</b>&quot;
option when prompted.
</p>
<h2>
<strong>DbFactory Support (Desktop Framework)</strong></h2>
In order to use the SQLiteFactory and have the SQLite data provider enumerated in
the DbProviderFactories methods, you must add the following segment into your application's
app.config file:<br />
<pre>
&lt;configuration&gt;
    &lt;system.data&gt;
        &lt;DbProviderFactories&gt;
................................................................................
&lt;/configuration&gt;
</pre>
<p>
See the help documentation for further details on implementing both version-specific
(GAC enabled) and version independent DBProviderFactories support.
</p>

<h2>Compiling for the .NET Compact Framework</h2>

<p>
Just change the target platform from Win32 to Compact Framework and recompile.&nbsp;
<strong>The Compact Framework has no support for enumerating attributes in an assembly,
therefore all user-defined collating sequences and functions must be explicitly
registered.</strong>&nbsp; See the <strong>testce</strong> sample application for
an example of how to explicitly register user-defined collating sequences and functions.</p>

<h2><b><a name="redist"></a>Distributing or Deploying System.Data.SQLite</b></h2>

<p>
On the desktop, when using the statically linked mixed-mode assembly, only the
<strong>System.Data.SQLite.dll</strong> file needs to be distributed with your
application(s).  This dynamic link library contains both the managed provider
and the SQLite native library.  For other build configurations, including those
for the .NET Compact Framework, you will need to distribute both the managed

provider <strong>System.Data.SQLite.dll</strong>, as well as the associated
native library <strong>SQLite.Interop.dll</strong> (or
<strong>SQLite.Interop.XXX.dll</strong> for the .NET Compact Framework).  For
the .NET Compact Framework edition, this is a breaking change as of 1.0.59.0.

The recent versions of the .NET Compact Framework do not appear to properly
support mixed-mode assemblies.  All builds of System.Data.SQLite, except those
explicitly marked as &quot;static&quot; in their package name, will also require
the associated <a href="https://support.microsoft.com/kb/2019667">Microsoft
Visual C++ Runtime Library</a> to be installed on the target machine.  For
further details on distributing and/or deploying System.Data.SQLite, please
refer to the
<a href="http://system.data.sqlite.org/index.html/doc/trunk/www/downloads.wiki">System.Data.SQLite Downloads</a>
web page.
</p>

<h2><b>Development Notes Regarding the SQLite Native Library Source Code</b></h2>

<p>



The included SQLite native library is compiled directly from the official source
code releases available from the <a href="http://www.sqlite.org/">sqlite.org</a>
website.
</p>

<p>
In addition, there are several relatively small extensions included within the
System.Data.SQLite &quot;interop assembly&quot; and some of these extensions are
specific to the System.Data.SQLite project itself; however, the included SQLite
native library source code itself is compiled verbatim, using a set of fully
supported <a href="http://www.sqlite.org/compile.html">compile-time options</a>
designed for robustness and maximum backward compatibility with previously
released versions of System.Data.SQLite.
</p>

<h2><b>Version History</b></h2>

<p>
    <b>1.0.91.0 - February XX, 2014 <font color="red">(release scheduled)</font></b>
</p>
................................................................................
<li>Code merge with SQLite 3.3.4</li><li>Fixed an encryption bug when changing the
password of databases over 1gb in size.&nbsp;</li><li>Fixed various designer issues
related to construction of named parameters.</li>
<li>Retooled the GetSchema() method of SQLiteDataReader to use the new 3.3.4 API
functions, and made several enhancements and fixes to schemas.&nbsp;</li>
<li>Implemented the SourceColumnNullMapping property of SQLiteParameter to fix a
DbCommandBuilder code generation bug.&nbsp;</li><li>Removed the runtime dependency
on msvcr80.dll.&nbsp; File size is somewhat larger for the varying desktop versions.</li><li>
Created an install program to manage installation and uninstallation of the SQLite
design-time support.</li>
<li>Designer support now works for all Visual Studio editions, including all Express
Editions.</li>
<li>Design-time installer will now remove (if present) the machine.config SQLite
entries in favor of installing the xml code into the devenv.exe.config file (or
any of the variations for express editions).&nbsp; The officially-accepted behavior
................................................................................
<p>
<b>1.0.24.5 beta - January 20, 2006</b></p>
<ul>
<li>This beta is built from sqlite.org's 3.3.1 alpha and contains development-in-progress
code.&nbsp; Therefore no guarantees can be made regarding its suitability for production
use.</li>
<li><strong>You no longer need to distribute 2 files on the CompactFramework.&nbsp;
You can delete SQLite.Interop.dll entirely.&nbsp; </strong>I wrote a custom tool
called "mergebin" (available in the source zip file) which combines the two libraries
and gets around a glaring defect in the VS2005 linker for ARM processors which doesn't
allow you to link netmodules.</li>
<li><strong>x64 and ia64 builds now use the same strong name as the x86 build.</strong>&nbsp;
This means breaking backward compatibility, but it was necessary in order to allow
you to drop any of those 3 builds onto a PC and have your .NET program run properly.&nbsp;
Prior to this, you'd get an error if you built your program using the x86 build,
................................................................................
been previously prepared and a Prepare() function is called (and the command is
associated with a connection) or just prior to the command being executed.&nbsp;</li></ul>
</div>
<p>
<b>1.0.11 - August 1, 2005</b><br />
</p>
<ul>
<li><strong>For everything except the Compact Framework, System.Data.SQLite.dll
is now the <em>only</em> DLL required to use this provider!</strong>&nbsp; The assembly
is now a multi-module assembly, containing both the native SQLite3 codebase and
the C# classes built on top of it.&nbsp; The Compact Framework version (when completed)
will not be able to support this feature, so backwards compatibility with the Compact
Framework has been preserved for the future.
<li>Fixed a bug in SQLiteCommand.ExecuteScalar() that caused it to stop executing
commands once it obtained the first column of the first row-returning resultset.&nbsp;
................................................................................
the parameters to be out of whack. </li>
</ul>
<p>
<b>1.0.09a - May 25, 2005</b><br />
</p>
<ul>
<li>Fixed a broken helpfile and corrected some obsolete help remarks in SQLiteFunction.cs
<li>Added a version resource to the SQLite.Interop.dll.&nbsp;</li></ul>
<p>
<b>1.0.09 - May 24, 2005</b><br />
</p>
<ul>
<li>Code merge with the latest 3.21 version of SQLite.
<li>Removed obsolete methods and properties for Whidbey Beta 2</li></ul>
<p>
................................................................................
<li>Fixed the SQLite3 C# class step/reset functions to accomodate schema changes
that invalidate a prepared statement.&nbsp; Statements are recompiled transparently.
<li>Moved all native DLL declarations to an UnsafeNativeMethods class.
<li>Split several classes into their own modules for readability.
<li>Renamed many internal variables, reviewed access to variables marked as internal
and altered their protection levels accordingly.
<li>Due to the presence of the altered sqlite3 codebase and so many added interop
functions, I decided to rename the sqlite3 C project and the DLL to SQLite.Interop.dll.&nbsp;
This is the same core sqlite3 codebase but designed specifically for this ADO.NET
provider.&nbsp; This eliminates any possibility of someone dropping another build
of sqlite3.dll into the system and rendering the provider inoperable.&nbsp; In the
future if the folks at sqlite.org finally introduce a method of retrieving column
usage for an arbitrary prepared statement, I'll retool this library to be a lightweight
function call wrapper around the core binary distribution.
<li>Added [SuppressUnmanagedCodeSecurity] attribute to the UnsafeNativeMethods class