Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | 1.0.12 updates |
---|---|
Downloads: | Tarball | ZIP archive |
Timelines: | family | ancestors | descendants | both | sourceforge |
Files: | files | file ages | folders |
SHA1: |
e26928899712f96df2b0124cb341b436 |
User & Date: | rmsimpson 2005-08-03 06:43:43.000 |
Context
2005-08-04
| ||
15:25 | 1.0.12 updates and cleanup check-in: 3ebf811b1e user: rmsimpson tags: sourceforge | |
2005-08-03
| ||
06:43 | 1.0.12 updates check-in: e269288997 user: rmsimpson tags: sourceforge | |
2005-08-02
| ||
05:36 | 1.0.12 - Compact Framework Support check-in: f341de7fd7 user: rmsimpson tags: sourceforge | |
Changes
Changes to SQLite.Interop/SQLite.Interop.rc.
︙ | ︙ | |||
50 51 52 53 54 55 56 | ///////////////////////////////////////////////////////////////////////////// // // Version // VS_VERSION_INFO VERSIONINFO FILEVERSION 3,2,2,0 | | | 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 | ///////////////////////////////////////////////////////////////////////////// // // Version // VS_VERSION_INFO VERSIONINFO FILEVERSION 3,2,2,0 PRODUCTVERSION 1,0,12,0 FILEFLAGSMASK 0x17L #ifdef _DEBUG FILEFLAGS 0x1L #else FILEFLAGS 0x0L #endif FILEOS 0x4L |
︙ | ︙ | |||
72 73 74 75 76 77 78 | VALUE "Comments", "http://sourceforge.net/projects/sqlite-dotnet2" VALUE "FileDescription", "SQLite.NET Interop Library" VALUE "FileVersion", "3.2.2" VALUE "InternalName", "SQLite.Interop.DLL" VALUE "LegalCopyright", "Released to the public domain" VALUE "OriginalFilename", "SQLite3.DLL" VALUE "ProductName", "SQLite.NET" | | | 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 | VALUE "Comments", "http://sourceforge.net/projects/sqlite-dotnet2" VALUE "FileDescription", "SQLite.NET Interop Library" VALUE "FileVersion", "3.2.2" VALUE "InternalName", "SQLite.Interop.DLL" VALUE "LegalCopyright", "Released to the public domain" VALUE "OriginalFilename", "SQLite3.DLL" VALUE "ProductName", "SQLite.NET" VALUE "ProductVersion", "1.0.12" END END BLOCK "VarFileInfo" BEGIN VALUE "Translation", 0x409, 1200 END END |
︙ | ︙ |
Changes to SQLite.Interop/SQLite.Interop.vcproj.
︙ | ︙ | |||
43 44 45 46 47 48 49 | Name="VCWebServiceProxyGeneratorTool" /> <Tool Name="VCMIDLTool" /> <Tool Name="VCCLCompilerTool" | | | 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 | Name="VCWebServiceProxyGeneratorTool" /> <Tool Name="VCMIDLTool" /> <Tool Name="VCCLCompilerTool" AdditionalOptions="/GS-" PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;_CRT_SECURE_NO_DEPRECATE;NO_TCL;THREADSAFE" StringPooling="true" RuntimeLibrary="2" /> <Tool Name="VCManagedResourceCompilerTool" /> |
︙ | ︙ | |||
122 123 124 125 126 127 128 | <Tool Name="VCMIDLTool" /> <Tool Name="VCCLCompilerTool" ExecutionBucket="7" AdditionalOptions="/GS-" | < < < | 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 | <Tool Name="VCMIDLTool" /> <Tool Name="VCCLCompilerTool" ExecutionBucket="7" AdditionalOptions="/GS-" PreprocessorDefinitions="_WIN32_WCE=$(CEVER);UNDER_CE=$(CEVER);WINCE;$(PLATFORMDEFINES);NDEBUG;_WINDOWS;_USRDLL;CPPSMART_EXPORTS;$(ARCHFAM);$(_ARCHFAM_);UNICODE;_UNICODE" StringPooling="true" /> <Tool Name="VCManagedResourceCompilerTool" /> <Tool Name="VCResourceCompilerTool" PreprocessorDefinitions="NDEBUG;_UNICODE;UNICODE;_WIN32_WCE;UNDER_CE" |
︙ | ︙ |
Changes to SQLite.Interop/src/btree.c.
︙ | ︙ | |||
8 9 10 11 12 13 14 | ** a legal notice, here is a blessing: ** ** May you do good and not evil. ** May you find forgiveness for yourself and forgive others. ** May you share freely, never taking more than you give. ** ************************************************************************* | | | 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | ** a legal notice, here is a blessing: ** ** May you do good and not evil. ** May you find forgiveness for yourself and forgive others. ** May you share freely, never taking more than you give. ** ************************************************************************* ** $Id: btree.c,v 1.7 2005/08/03 06:43:44 rmsimpson Exp $ ** ** This file implements a external (disk-based) database using BTrees. ** For a detailed discussion of BTrees, refer to ** ** Donald E. Knuth, THE ART OF COMPUTER PROGRAMMING, Volume 3: ** "Sorting And Searching", pages 473-480. Addison-Wesley ** Publishing Company, Reading, Massachusetts. |
︙ | ︙ | |||
4882 4883 4884 4885 4886 4887 4888 | int rc; BtCursor *pCur; if( pBt->inTrans!=TRANS_WRITE ){ return pBt->readOnly ? SQLITE_READONLY : SQLITE_ERROR; } for(pCur=pBt->pCursor; pCur; pCur=pCur->pNext){ if( pCur->pgnoRoot==(Pgno)iTable ){ | | > | 4882 4883 4884 4885 4886 4887 4888 4889 4890 4891 4892 4893 4894 4895 4896 4897 | int rc; BtCursor *pCur; if( pBt->inTrans!=TRANS_WRITE ){ return pBt->readOnly ? SQLITE_READONLY : SQLITE_ERROR; } for(pCur=pBt->pCursor; pCur; pCur=pCur->pNext){ if( pCur->pgnoRoot==(Pgno)iTable ){ if( pCur->wrFlag==0 ) return SQLITE_LOCKED; moveToRoot(pCur); } } rc = clearDatabasePage(pBt, (Pgno)iTable, 0, 0); if( rc ){ sqlite3BtreeRollback(pBt); } |
︙ | ︙ |
Changes to SQLite.NET.sln.
︙ | ︙ | |||
42 43 44 45 46 47 48 | {E27B1B1E-19C0-45E8-AA74-B6E1C041A130}.Release|Compact Framework.ActiveCfg = Release|Any CPU {E27B1B1E-19C0-45E8-AA74-B6E1C041A130}.Release|Win32.ActiveCfg = Release|Any CPU {E27B1B1E-19C0-45E8-AA74-B6E1C041A130}.Release|Win32.Build.0 = Release|Any CPU {10B51CE8-A838-44DE-BD82-B658F0296F80}.Debug|Compact Framework.ActiveCfg = Release|Pocket PC 2003 (ARMV4) {10B51CE8-A838-44DE-BD82-B658F0296F80}.Debug|Compact Framework.Build.0 = Release|Pocket PC 2003 (ARMV4) {10B51CE8-A838-44DE-BD82-B658F0296F80}.Debug|Compact Framework.Deploy.0 = Release|Pocket PC 2003 (ARMV4) {10B51CE8-A838-44DE-BD82-B658F0296F80}.Debug|Win32.ActiveCfg = Release|Win32 | < | 42 43 44 45 46 47 48 49 50 51 52 53 54 55 | {E27B1B1E-19C0-45E8-AA74-B6E1C041A130}.Release|Compact Framework.ActiveCfg = Release|Any CPU {E27B1B1E-19C0-45E8-AA74-B6E1C041A130}.Release|Win32.ActiveCfg = Release|Any CPU {E27B1B1E-19C0-45E8-AA74-B6E1C041A130}.Release|Win32.Build.0 = Release|Any CPU {10B51CE8-A838-44DE-BD82-B658F0296F80}.Debug|Compact Framework.ActiveCfg = Release|Pocket PC 2003 (ARMV4) {10B51CE8-A838-44DE-BD82-B658F0296F80}.Debug|Compact Framework.Build.0 = Release|Pocket PC 2003 (ARMV4) {10B51CE8-A838-44DE-BD82-B658F0296F80}.Debug|Compact Framework.Deploy.0 = Release|Pocket PC 2003 (ARMV4) {10B51CE8-A838-44DE-BD82-B658F0296F80}.Debug|Win32.ActiveCfg = Release|Win32 {10B51CE8-A838-44DE-BD82-B658F0296F80}.Release|Compact Framework.ActiveCfg = Release|Pocket PC 2003 (ARMV4) {10B51CE8-A838-44DE-BD82-B658F0296F80}.Release|Compact Framework.Build.0 = Release|Pocket PC 2003 (ARMV4) {10B51CE8-A838-44DE-BD82-B658F0296F80}.Release|Compact Framework.Deploy.0 = Release|Pocket PC 2003 (ARMV4) {10B51CE8-A838-44DE-BD82-B658F0296F80}.Release|Win32.ActiveCfg = Release|Win32 {10B51CE8-A838-44DE-BD82-B658F0296F80}.Release|Win32.Build.0 = Release|Win32 {B86CE504-C4E4-496F-A0F0-E613BCFD3DF7}.Debug|Compact Framework.ActiveCfg = Debug|Any CPU {B86CE504-C4E4-496F-A0F0-E613BCFD3DF7}.Debug|Compact Framework.Build.0 = Debug|Any CPU |
︙ | ︙ |
Changes to System.Data.SQLite/AssemblyInfo.cs.
︙ | ︙ | |||
24 25 26 27 28 29 30 | // Major Version // Minor Version // Build Number // Revision // // You can specify all the values or you can default the Revision and Build Numbers // by using the '*' as shown below: | | | 24 25 26 27 28 29 30 31 | // Major Version // Minor Version // Build Number // Revision // // You can specify all the values or you can default the Revision and Build Numbers // by using the '*' as shown below: [assembly: AssemblyVersion("1.0.12.*")] |
Changes to System.Data.SQLite/SQLite3.cs.
︙ | ︙ | |||
16 17 18 19 20 21 22 | /// </summary> internal class SQLite3 : SQLiteBase { /// <summary> /// The opaque pointer returned to us by the sqlite provider /// </summary> protected int _sql; | < | 16 17 18 19 20 21 22 23 24 25 26 27 28 29 | /// </summary> internal class SQLite3 : SQLiteBase { /// <summary> /// The opaque pointer returned to us by the sqlite provider /// </summary> protected int _sql; /// <summary> /// The user-defined functions registered on this connection /// </summary> protected SQLiteFunction[] _functionsArray; internal SQLite3(DateTimeFormat fmt) : base(fmt) |
︙ | ︙ | |||
100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 | } if (n > 0) throw new SQLiteException(n, str); } internal override bool Step(SQLiteStatement stmt) { int n; while (true) { n = UnsafeNativeMethods.sqlite3_step_interop(stmt._sqlite_stmt); if (n == 100) return true; if (n == 101) return false; if (n > 0) { // An error occurred, attempt to reset the statement. If the reset worked because the // schema has changed, re-try the step again. Otherwise throw the original error. | > > > | > | | | > > > > > > > > > > > > > > > > > > > > | | > > | | > > | | | | 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 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 214 215 216 217 | } if (n > 0) throw new SQLiteException(n, str); } internal override bool Step(SQLiteStatement stmt) { int n; long dwtick = 0; Random rnd = null; while (true) { n = UnsafeNativeMethods.sqlite3_step_interop(stmt._sqlite_stmt); if (n == 100) return true; if (n == 101) return false; if (n > 0) { int r; // An error occurred, attempt to reset the statement. If the reset worked because the // schema has changed, re-try the step again. Otherwise throw the original error. r = Reset(stmt); if (r == 0) throw new SQLiteException(n, "in Step()"); else if (r == 6 && stmt._command != null) // SQLITE_LOCKED { // Keep trying if (dwtick == 0) // First time we've encountered the lock { dwtick = DateTime.Now.Ticks + (stmt._command._commandTimeout * 10000000); rnd = new Random(); } // If we've exceeded the command's timeout, give up and throw an error if (DateTime.Now.Ticks - dwtick > 0) { throw new SQLiteException(r, "in Step() - timeout"); } else { // Otherwise sleep for a random amount of time up to 250ms UnsafeNativeMethods.Sleep((uint)rnd.Next(1, 250)); } } } } } internal override void Finalize(SQLiteStatement stmt) { if (stmt._sqlite_stmt > 0) { int n = UnsafeNativeMethods.sqlite3_finalize_interop(stmt._sqlite_stmt); if (n > 0) throw new SQLiteException(n, "in Finalize()"); } stmt._sqlite_stmt = 0; } internal override int Reset(SQLiteStatement stmt) { int n; n = UnsafeNativeMethods.sqlite3_reset_interop(stmt._sqlite_stmt); // If the schema changed, try and re-prepare it if (n == 17) // SQLITE_SCHEMA { // Recreate a dummy statement int nc = 0; string str; using (SQLiteStatement tmp = Prepare(stmt._sqlStatement, ref nc, out str)) { // Finalize the existing statement Finalize(stmt); // Reassign a new statement pointer to the old statement and clear the temporary one stmt._sqlite_stmt = tmp._sqlite_stmt; tmp._sqlite_stmt = 0; // Reapply parameters stmt.BindParameters(); } return -1; // Reset was OK, with schema change } else if (n == 6) // SQLITE_LOCKED return n; if (n > 0) throw new SQLiteException(n, "in Reset()"); return 0; // We reset OK, no schema changes } internal override string SQLiteLastError() { int len; return ToString(UnsafeNativeMethods.sqlite3_errmsg_interop(_sql, out len), len); } internal override SQLiteStatement Prepare(string strSql, ref int nParamStart, out string strRemain) { int stmt; IntPtr ptr; int len; byte[] b = ToUTF8(strSql); int n = UnsafeNativeMethods.sqlite3_prepare_interop(_sql, b, b.Length - 1, out stmt, out ptr, out len); if (n > 0) throw new SQLiteException(n, "in Prepare()"); strRemain = ToString(ptr, len); SQLiteStatement cmd = null; if (stmt > 0) cmd = new SQLiteStatement(this, stmt, strSql.Substring(0, strSql.Length - strRemain.Length), ref nParamStart); return cmd; |
︙ | ︙ |
Changes to System.Data.SQLite/SQLiteBase.cs.
︙ | ︙ | |||
89 90 91 92 93 94 95 | /// <param name="stmt">The statement to finalize</param> internal abstract void Finalize(SQLiteStatement stmt); /// <summary> /// Resets a prepared statement so it can be executed again. If the error returned is SQLITE_SCHEMA, /// transparently attempt to rebuild the SQL statement and throw an error if that was not possible. /// </summary> /// <param name="stmt">The statement to reset</param> | | | | 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 | /// <param name="stmt">The statement to finalize</param> internal abstract void Finalize(SQLiteStatement stmt); /// <summary> /// Resets a prepared statement so it can be executed again. If the error returned is SQLITE_SCHEMA, /// transparently attempt to rebuild the SQL statement and throw an error if that was not possible. /// </summary> /// <param name="stmt">The statement to reset</param> /// <returns>Returns -1 if the schema changed while resetting, 0 if the reset was sucessful or 6 (SQLITE_LOCKED) if the reset failed due to a lock</returns> internal abstract int Reset(SQLiteStatement stmt); internal abstract void Cancel(); /// <summary> /// An interop-specific function, this call sets an internal flag in the sqlite.interop.dll which causes all column names /// of subsequently-prepared statements to return in Database.Table.Column format, ignoring all aliases that may have been applied /// to tables or columns in a resultset. |
︙ | ︙ |
Changes to System.Data.SQLite/SQLiteCommand.cs.
︙ | ︙ | |||
28 29 30 31 32 33 34 | /// <summary> /// Indicates whether or not a DataReader is active on the command. /// </summary> private bool _isReaderOpen; /// <summary> /// The timeout for the command, kludged because SQLite doesn't support per-command timeout values /// </summary> | | | 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 | /// <summary> /// Indicates whether or not a DataReader is active on the command. /// </summary> private bool _isReaderOpen; /// <summary> /// The timeout for the command, kludged because SQLite doesn't support per-command timeout values /// </summary> internal int _commandTimeout; /// <summary> /// Designer support /// </summary> private bool _designTimeVisible; /// <summary> /// Used by DbDataAdapter to determine updating behavior /// </summary> |
︙ | ︙ | |||
155 156 157 158 159 160 161 | List<SQLiteStatement> lst = new List<SQLiteStatement>(); try { while (strRemain.Length > 0) { itm = _cnn._sql.Prepare(strRemain, ref nStart, out strRemain); | | > > > > | 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 | List<SQLiteStatement> lst = new List<SQLiteStatement>(); try { while (strRemain.Length > 0) { itm = _cnn._sql.Prepare(strRemain, ref nStart, out strRemain); if (itm != null) { itm._command = this; lst.Add(itm); } } } catch (Exception e) { ClearCommands(); throw (e); } |
︙ | ︙ | |||
199 200 201 202 203 204 205 | // if (value == null) // throw new ArgumentNullException(); ClearCommands(); _commandText = value; if (_cnn == null) return; | < < | 203 204 205 206 207 208 209 210 211 212 213 214 215 216 | // if (value == null) // throw new ArgumentNullException(); ClearCommands(); _commandText = value; if (_cnn == null) return; } } /// <summary> /// The amount of time to wait for the connection to become available before erroring out /// </summary> public override int CommandTimeout |
︙ | ︙ | |||
325 326 327 328 329 330 331 | if (_cnn.State != ConnectionState.Open) throw new InvalidOperationException("Database is not open"); int n; int x; | < < | < | 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 | if (_cnn.State != ConnectionState.Open) throw new InvalidOperationException("Database is not open"); int n; int x; Prepare(); // Make sure all parameters are mapped properly to associated statement(s) _parameterCollection.MapParameters(); x = _statementList.Length; // Bind all parameters to their statements for (n = 0; n < x; n++) |
︙ | ︙ | |||
438 439 440 441 442 443 444 | } /// <summary> /// Prepares the command for execution. /// </summary> public override void Prepare() { | > > | | | | > > > | 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 | } /// <summary> /// Prepares the command for execution. /// </summary> public override void Prepare() { if (_statementList != null) { if (_statementList.Length == 0) { BuildCommands(); } } else BuildCommands(); } /// <summary> /// Sets the method the SQLiteCommandBuilder uses to determine how to update inserted or updated rows in a DataTable. /// </summary> public override UpdateRowSource UpdatedRowSource { |
︙ | ︙ |
Changes to System.Data.SQLite/SQLiteStatement.cs.
︙ | ︙ | |||
14 15 16 17 18 19 20 | /// Represents a single SQL statement in SQLite. /// </summary> internal sealed class SQLiteStatement : IDisposable { /// <summary> /// The underlying SQLite object this statement is bound to /// </summary> | | | | | > > > > > | 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 | /// Represents a single SQL statement in SQLite. /// </summary> internal sealed class SQLiteStatement : IDisposable { /// <summary> /// The underlying SQLite object this statement is bound to /// </summary> internal SQLiteBase _sql; /// <summary> /// The command text of this SQL statement /// </summary> internal string _sqlStatement; /// <summary> /// The actual statement pointer /// </summary> internal int _sqlite_stmt; /// <summary> /// An index from which unnamed parameters begin /// </summary> internal int _unnamedParameterStart; /// <summary> /// Names of the parameters as SQLite understands them to be /// </summary> internal string[] _paramNames; /// <summary> /// Parameters for this statement /// </summary> internal SQLiteParameter[] _paramValues; /// <summary> /// Command this statement belongs to (if any) /// </summary> internal SQLiteCommand _command; /// <summary> /// Initializes the statement and attempts to get all information about parameters in the statement /// </summary> /// <param name="sqlbase">The base SQLite object</param> /// <param name="stmt">The statement</param> /// <param name="strCommand">The command text for this statement</param> /// <param name="nCmdStart">The index at which to start numbering unnamed parameters</param> internal SQLiteStatement(SQLiteBase sqlbase, int stmt, string strCommand, ref int nCmdStart) { _paramNames = null; _paramValues = null; _command = null; _unnamedParameterStart = nCmdStart; _sql = sqlbase; _sqlite_stmt = stmt; _sqlStatement = strCommand; // Determine parameters for this statement (if any) and prepare space for them. |
︙ | ︙ |
Changes to System.Data.SQLite/System.Data.SQLite.csproj.user.
1 2 | <Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <PropertyGroup> | > | < | | 1 2 3 4 5 6 7 | <Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <PropertyGroup> <DeployDeviceID>E282E6BE-C7C3-4ece-916A-88FB1CF8AF3C</DeployDeviceID> <LastOpenVersion>8.0.50215</LastOpenVersion> <ProvisionStore>none</ProvisionStore> </PropertyGroup> </Project> |
Changes to System.Data.SQLite/UnsafeNativeMethods.cs.
︙ | ︙ | |||
18 19 20 21 22 23 24 25 26 27 28 29 30 31 | { #if !PLATFORM_COMPACTFRAMEWORK private const string SQLITE_DLL = "System.Data.SQLite.DLL"; #else private const string SQLITE_DLL = "SQLite.Interop.DLL"; #endif [DllImport(SQLITE_DLL)] internal static extern IntPtr sqlite3_libversion_interop(out int len); [DllImport(SQLITE_DLL)] internal static extern void sqlite3_free_interop(IntPtr p); [DllImport(SQLITE_DLL)] | > > > | 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 | { #if !PLATFORM_COMPACTFRAMEWORK private const string SQLITE_DLL = "System.Data.SQLite.DLL"; #else private const string SQLITE_DLL = "SQLite.Interop.DLL"; #endif [DllImport("kernel32.dll")] internal static extern void Sleep(uint dwMilliseconds); [DllImport(SQLITE_DLL)] internal static extern IntPtr sqlite3_libversion_interop(out int len); [DllImport(SQLITE_DLL)] internal static extern void sqlite3_free_interop(IntPtr p); [DllImport(SQLITE_DLL)] |
︙ | ︙ |
Changes to bin/CompactFramework/SQLite.Interop.dll.
cannot compute difference between binary files
Changes to bin/CompactFramework/System.Data.SQLite.dll.
cannot compute difference between binary files
Changes to bin/CompactFramework/testce.exe.
cannot compute difference between binary files
Changes to bin/System.Data.SQLite.dll.
cannot compute difference between binary files
Changes to bin/test.exe.
cannot compute difference between binary files
Changes to readme.htm.
1 2 3 4 5 6 7 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <title></title> </head> <body> ADO.NET 2.0 SQLite Data Provider<br> | | | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <title></title> </head> <body> ADO.NET 2.0 SQLite Data Provider<br> Version 1.0.12 - Aug 3, 2005<br> Interop using SQLite 3.22<br> Written by Robert Simpson (<a href="mailto:robert@blackcastlesoft.com">robert@blackcastlesoft.com</a>)<br> Released to the public domain, use at your own risk!<br> <br> This provider was written and tested using the Visual Studio 2005 Beta 2 release.<br> <br> |
︙ | ︙ | |||
72 73 74 75 76 77 78 79 80 81 82 83 84 85 | <p> Just change the target platform from Win32 to Compact Framework and recompile. <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> 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>For Win32 platforms, only the <STRONG>System.Data.SQLite.DLL</STRONG> file in the <STRONG>bin</STRONG> folder should be distributed with your application(s). This DLL contains both the managed wrapper and the native SQLite3 codebase.</P> <P>For Compact Framework platforms, your application should reference the <STRONG>System.Data.SQLite.DLL</STRONG> | > > | 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 | <p> Just change the target platform from Win32 to Compact Framework and recompile. <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> See the <STRONG>testce</STRONG> sample application for an example of how to explicitly register user-defined collating sequences and functions.</p> <P>Many thanks to the fine folks at <A href="http://sourceforge.net/projects/sqlite-wince"> http://sourceforge.net/projects/sqlite-wince</A> for the Windows CE code!</P> <h2> <b><A name="redist"></A>Distributing The SQLite Engine and ADO.NET Assembly</b></h2> <P>For Win32 platforms, only the <STRONG>System.Data.SQLite.DLL</STRONG> file in the <STRONG>bin</STRONG> folder should be distributed with your application(s). This DLL contains both the managed wrapper and the native SQLite3 codebase.</P> <P>For Compact Framework platforms, your application should reference the <STRONG>System.Data.SQLite.DLL</STRONG> |
︙ | ︙ | |||
129 130 131 132 133 134 135 136 137 138 139 140 141 142 | <ul> <li> Full support for the Compact Framework. Each build (Debug/Release) now has a platform, either Win32 or Compact Framework. The correct projects are built accordingly. See the <a href="#redist">Distributing SQLite</a> section for information on what files need to be distributed for each platform. </li> </ul> <b>1.0.11 - August 1, 2005</b><br> <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> The assembly is now a multi-module assembly, containing both the native SQLite3 | > > > > | 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 | <ul> <li> Full support for the Compact Framework. Each build (Debug/Release) now has a platform, either Win32 or Compact Framework. The correct projects are built accordingly. See the <a href="#redist">Distributing SQLite</a> section for information on what files need to be distributed for each platform. </li> <li> Modified SQLite3.Reset() and Step() functions to transparently handle timeouts while waiting on the database to become available (typically when a writer is waiting on a reader to finish, or a reader is waiting on a writer to finish).</li> </ul> <b>1.0.11 - August 1, 2005</b><br> <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> The assembly is now a multi-module assembly, containing both the native SQLite3 |
︙ | ︙ |
Changes to test/Program.cs.
︙ | ︙ | |||
22 23 24 25 26 27 28 | //} // cnn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\\Temp\\db.mdb;Persist Security Info=False"; // cnn.ConnectionString = "Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=DirectLink;Data Source=MASTER"; // cnn.Open(); // TestCases.Run(fact, cnn); | < | > | | 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 | //} // cnn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\\Temp\\db.mdb;Persist Security Info=False"; // cnn.ConnectionString = "Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=DirectLink;Data Source=MASTER"; // cnn.Open(); // TestCases.Run(fact, cnn); using (cnn = new SQLiteConnection()) { fact = DbProviderFactories.GetFactory("System.Data.SQLite"); cnn.ConnectionString = "Data Source=test.db3;Synchronous=Off"; cnn.Open(); TestCases.Run(fact, cnn); } System.IO.File.Delete("test.db3"); Console.ReadKey(); |
︙ | ︙ |
Changes to test/TestCases.cs.
︙ | ︙ | |||
86 87 88 89 90 91 92 93 94 95 96 97 98 99 | catch (Exception) { Console.WriteLine("FAIL - BinaryInsert"); } try { VerifyBinaryData(cnn); Console.WriteLine("SUCCESS - VerifyBinaryData"); } catch (Exception) { Console.WriteLine("FAIL - VerifyBinaryData"); } try { ParameterizedInsertMissingParams(cnn); Console.WriteLine("FAIL - ParameterizedInsertMissingParams"); } catch (Exception) { Console.WriteLine("SUCCESS - ParameterizedInsertMissingParams"); } try { InsertMany(fact, cnn, false); Console.WriteLine("SUCCESS - InsertMany"); } catch (Exception) { Console.WriteLine("FAIL - InsertMany"); } try { InsertMany(fact, cnn, true); Console.WriteLine("SUCCESS - InsertManyWithIdentityFetch"); } catch (Exception) { Console.WriteLine("FAIL - InsertManyWithIdentityFetch"); } | > > > | 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 | catch (Exception) { Console.WriteLine("FAIL - BinaryInsert"); } try { VerifyBinaryData(cnn); Console.WriteLine("SUCCESS - VerifyBinaryData"); } catch (Exception) { Console.WriteLine("FAIL - VerifyBinaryData"); } try { ParameterizedInsertMissingParams(cnn); Console.WriteLine("FAIL - ParameterizedInsertMissingParams"); } catch (Exception) { Console.WriteLine("SUCCESS - ParameterizedInsertMissingParams"); } try { TimeoutTest(cnn); Console.WriteLine("SUCCESS - TimeoutTest"); } catch (Exception) { Console.WriteLine("FAIL - TimeoutTest"); } try { InsertMany(fact, cnn, false); Console.WriteLine("SUCCESS - InsertMany"); } catch (Exception) { Console.WriteLine("FAIL - InsertMany"); } try { InsertMany(fact, cnn, true); Console.WriteLine("SUCCESS - InsertManyWithIdentityFetch"); } catch (Exception) { Console.WriteLine("FAIL - InsertManyWithIdentityFetch"); } |
︙ | ︙ | |||
474 475 476 477 478 479 480 481 482 483 484 485 486 487 | } dtEnd = DateTime.Now.Ticks; } Console.WriteLine(String.Format(" Intrinsic Function iteration of {0} records in {1} ms", nCount, (dtEnd - dtStart) / 10000)); } } // Causes the user-defined aggregate to be iterated through internal static void UserAggregate(DbConnection cnn) { using (DbCommand cmd = cnn.CreateCommand()) { long dtStart; | > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 | } dtEnd = DateTime.Now.Ticks; } Console.WriteLine(String.Format(" Intrinsic Function iteration of {0} records in {1} ms", nCount, (dtEnd - dtStart) / 10000)); } } // Open a reader and then attempt to write to test the writer's command timeout property // SQLite doesn't allow a write when a reader is active. internal static void TimeoutTest(DbConnection cnn) { using (DbCommand cmdRead = cnn.CreateCommand()) { cmdRead.CommandText = "SELECT ID FROM TestCase"; using (DbDataReader rd = cmdRead.ExecuteReader()) { using (DbCommand cmdwrite = cnn.CreateCommand()) { cmdwrite.CommandText = "UPDATE [TestCase] SET [ID] = [ID]"; cmdwrite.CommandTimeout = 10; long dwtick = DateTime.Now.Ticks; try { cmdwrite.ExecuteNonQuery(); } catch (SQLiteException) { dwtick = (DateTime.Now.Ticks - dwtick) / TimeSpan.TicksPerSecond; if (dwtick < 10 || dwtick > 11) throw new ArgumentOutOfRangeException(); } } } } } // Causes the user-defined aggregate to be iterated through internal static void UserAggregate(DbConnection cnn) { using (DbCommand cmd = cnn.CreateCommand()) { long dtStart; |
︙ | ︙ |
Changes to test/test.csproj.
︙ | ︙ | |||
40 41 42 43 44 45 46 | <PlatformTarget>AnyCPU</PlatformTarget> <FileAlignment>512</FileAlignment> <GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies> </PropertyGroup> <ItemGroup> <Reference Include="System" /> <Reference Include="System.Data" /> | | | 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 | <PlatformTarget>AnyCPU</PlatformTarget> <FileAlignment>512</FileAlignment> <GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies> </PropertyGroup> <ItemGroup> <Reference Include="System" /> <Reference Include="System.Data" /> <Reference Include="System.Data.SQLite, Version=1.0.11.37672, Culture=neutral, PublicKeyToken=db937bc2d44ff139, processorArchitecture=x86"> <SpecificVersion>False</SpecificVersion> <Private>False</Private> </Reference> <Reference Include="System.Xml" /> </ItemGroup> <ItemGroup> <None Include="app.config" /> |
︙ | ︙ |
Changes to test/test.csproj.user.
1 2 | <Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <PropertyGroup> | | < < < < < < < < < < < < < | 1 2 3 4 5 | <Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <PropertyGroup> <LastOpenVersion>8.0.50215</LastOpenVersion> </PropertyGroup> </Project> |
Changes to testce/Program.cs.
︙ | ︙ | |||
30 31 32 33 34 35 36 | SQLiteFunction.RegisterFunction(typeof(MyCount)); SQLiteFunction.RegisterFunction(typeof(MySequence)); using (cnn = new SQLiteConnection()) { TestCases tests = new TestCases(); | | | 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 | SQLiteFunction.RegisterFunction(typeof(MyCount)); SQLiteFunction.RegisterFunction(typeof(MySequence)); using (cnn = new SQLiteConnection()) { TestCases tests = new TestCases(); cnn.ConnectionString = "Data Source=test.db3;Synchronous=Off"; cnn.Open(); tests.Run(cnn); System.Windows.Forms.Application.Run(tests.frm); } System.IO.File.Delete("test.db3"); |
︙ | ︙ |