Index: Doc/SQLite.NET.chm
==================================================================
--- Doc/SQLite.NET.chm
+++ Doc/SQLite.NET.chm
cannot compute difference between binary files
Index: SQLite.Interop/FTS1/FTS1.vcproj
==================================================================
--- SQLite.Interop/FTS1/FTS1.vcproj
+++ SQLite.Interop/FTS1/FTS1.vcproj
@@ -27,11 +27,11 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -406,77 +466,17 @@
Name="VCFxCopTool"
/>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Index: SQLite.Interop/merge.h
==================================================================
--- SQLite.Interop/merge.h
+++ SQLite.Interop/merge.h
@@ -3,11 +3,11 @@
#include
#pragma data_seg(".clr")
#pragma comment(linker, "/SECTION:.clr,ER")
- char __ph[130148] = {0}; // The number of bytes to reserve
+ char __ph[130896] = {0}; // The number of bytes to reserve
#pragma data_seg()
typedef BOOL (WINAPI *DLLMAIN)(HANDLE, DWORD, LPVOID);
typedef struct EXTRA_STUFF
{
Index: SQLite.Interop/merge_full.h
==================================================================
--- SQLite.Interop/merge_full.h
+++ SQLite.Interop/merge_full.h
@@ -3,11 +3,11 @@
#include
#pragma data_seg(".clr")
#pragma comment(linker, "/SECTION:.clr,ER")
- char __ph[138916] = {0}; // The number of bytes to reserve
+ char __ph[139676] = {0}; // The number of bytes to reserve
#pragma data_seg()
typedef BOOL (WINAPI *DLLMAIN)(HANDLE, DWORD, LPVOID);
typedef struct EXTRA_STUFF
{
Index: SQLite.NET.suo
==================================================================
--- SQLite.NET.suo
+++ SQLite.NET.suo
cannot compute difference between binary files
Index: System.Data.SQLite/SQLiteConnection.cs
==================================================================
--- System.Data.SQLite/SQLiteConnection.cs
+++ System.Data.SQLite/SQLiteConnection.cs
@@ -1222,10 +1222,12 @@
if (String.Compare(schemaRow[SchemaTableColumn.ColumnName].ToString(), strColumn, true, CultureInfo.InvariantCulture) == 0
|| strColumn == null)
{
row = tbl.NewRow();
+ row["NUMERIC_PRECISION"] = schemaRow[SchemaTableColumn.NumericPrecision];
+ row["NUMERIC_SCALE"] = schemaRow[SchemaTableColumn.NumericScale];
row["TABLE_NAME"] = rdTables.GetString(2);
row["COLUMN_NAME"] = schemaRow[SchemaTableColumn.ColumnName];
row["TABLE_CATALOG"] = strCatalog;
row["ORDINAL_POSITION"] = schemaRow[SchemaTableColumn.ColumnOrdinal];
row["COLUMN_HASDEFAULT"] = (schemaRow[SchemaTableOptionalColumn.DefaultValue] != DBNull.Value);
@@ -1653,20 +1655,21 @@
if (String.Compare(rdTable.GetString(2), "INTEGER", true, CultureInfo.InvariantCulture) == 0)
maybeRowId = true;
}
}
}
+ // This is a rowid row
if (primaryKeys.Count == 1 && maybeRowId == true)
{
row = tbl.NewRow();
row["CONSTRAINT_CATALOG"] = strCatalog;
row["CONSTRAINT_NAME"] = String.Format(CultureInfo.InvariantCulture, "sqlite_master_PK_{0}", rdTables.GetString(2));
row["TABLE_CATALOG"] = strCatalog;
row["TABLE_NAME"] = rdTables.GetString(2);
row["COLUMN_NAME"] = primaryKeys[0].Value;
row["INDEX_NAME"] = row["CONSTRAINT_NAME"];
- row["ORDINAL_POSITION"] = primaryKeys[0].Key;
+ row["ORDINAL_POSITION"] = 0; // primaryKeys[0].Key;
if (String.IsNullOrEmpty(strIndex) || String.Compare(strIndex, (string)row["INDEX_NAME"], true, CultureInfo.InvariantCulture) == 0)
tbl.Rows.Add(row);
}
@@ -1673,10 +1676,11 @@
using (SQLiteCommand cmdIndexes = new SQLiteCommand(String.Format(CultureInfo.InvariantCulture, "SELECT * FROM [{0}].[sqlite_master] WHERE [type] LIKE 'index' AND [tbl_name] LIKE '{1}'", strCatalog, rdTables.GetString(2).Replace("'", "''")), this))
using (SQLiteDataReader rdIndexes = cmdIndexes.ExecuteReader())
{
while (rdIndexes.Read())
{
+ int ordinal = 0;
if (String.IsNullOrEmpty(strIndex) || String.Compare(strIndex, rdIndexes.GetString(1), true, CultureInfo.InvariantCulture) == 0)
{
using (SQLiteCommand cmdIndex = new SQLiteCommand(String.Format(CultureInfo.InvariantCulture, "PRAGMA [{0}].index_info([{1}])", strCatalog, rdIndexes.GetString(1)), this))
using (SQLiteDataReader rdIndex = cmdIndex.ExecuteReader())
{
@@ -1687,11 +1691,13 @@
row["CONSTRAINT_NAME"] = rdIndexes.GetString(1);
row["TABLE_CATALOG"] = strCatalog;
row["TABLE_NAME"] = rdIndexes.GetString(2);
row["COLUMN_NAME"] = rdIndex.GetString(2);
row["INDEX_NAME"] = rdIndexes.GetString(1);
- row["ORDINAL_POSITION"] = rdIndex.GetInt32(1);
+ row["ORDINAL_POSITION"] = ordinal; // rdIndex.GetInt32(1);
+
+ ordinal++;
if (String.IsNullOrEmpty(strColumn) || String.Compare(strColumn, row["COLUMN_NAME"].ToString(), true, CultureInfo.InvariantCulture) == 0)
tbl.Rows.Add(row);
}
}
Index: System.Data.SQLite/SQLiteConvert.cs
==================================================================
--- System.Data.SQLite/SQLiteConvert.cs
+++ System.Data.SQLite/SQLiteConvert.cs
@@ -455,10 +455,76 @@
2147483647,
2147483647,
2147483647,
2147483647, // 25 (Xml)
};
+
+ internal static object DbTypeToNumericPrecision(DbType typ)
+ {
+ return _dbtypetonumericprecision[(int)typ];
+ }
+
+ private static object[] _dbtypetonumericprecision = {
+ DBNull.Value, // 0
+ DBNull.Value, // 1
+ 3,
+ DBNull.Value,
+ 19,
+ DBNull.Value, // 5
+ DBNull.Value, // 6
+ 53,
+ 53,
+ DBNull.Value,
+ 5,
+ 10,
+ 19,
+ DBNull.Value,
+ 3,
+ 24,
+ DBNull.Value,
+ DBNull.Value,
+ 5,
+ 10,
+ 19,
+ 53,
+ DBNull.Value,
+ DBNull.Value,
+ DBNull.Value
+ };
+
+ internal static object DbTypeToNumericScale(DbType typ)
+ {
+ return _dbtypetonumericscale[(int)typ];
+ }
+
+ private static object[] _dbtypetonumericscale = {
+ DBNull.Value, // 0
+ DBNull.Value, // 1
+ 0,
+ DBNull.Value,
+ 4,
+ DBNull.Value, // 5
+ DBNull.Value, // 6
+ DBNull.Value,
+ DBNull.Value,
+ DBNull.Value,
+ 0,
+ 0,
+ 0,
+ DBNull.Value,
+ 0,
+ DBNull.Value,
+ DBNull.Value,
+ DBNull.Value,
+ 0,
+ 0,
+ 0,
+ 0,
+ DBNull.Value,
+ DBNull.Value,
+ DBNull.Value
+ };
///
/// Convert a DbType to a Type
///
/// The DbType to convert from
Index: System.Data.SQLite/SQLiteDataReader.cs
==================================================================
--- System.Data.SQLite/SQLiteDataReader.cs
+++ System.Data.SQLite/SQLiteDataReader.cs
@@ -567,16 +567,18 @@
for (int n = 0; n < _fieldCount; n++)
{
row = tbl.NewRow();
+ DbType typ = GetSQLiteType(n).Type;
+
// Default settings for the column
row[SchemaTableColumn.ColumnName] = GetName(n);
row[SchemaTableColumn.ColumnOrdinal] = n;
- row[SchemaTableColumn.ColumnSize] = SQLiteConvert.DbTypeToColumnSize(GetSQLiteType(n).Type);
- row[SchemaTableColumn.NumericPrecision] = 255;
- row[SchemaTableColumn.NumericScale] = 255;
+ row[SchemaTableColumn.ColumnSize] = SQLiteConvert.DbTypeToColumnSize(typ);
+ row[SchemaTableColumn.NumericPrecision] = SQLiteConvert.DbTypeToNumericPrecision(typ);
+ row[SchemaTableColumn.NumericScale] = SQLiteConvert.DbTypeToNumericScale(typ);
row[SchemaTableColumn.ProviderType] = GetSQLiteType(n).Type;
row[SchemaTableColumn.IsLong] = (GetSQLiteType(n).Type == DbType.Binary);
row[SchemaTableColumn.AllowDBNull] = true;
row[SchemaTableOptionalColumn.IsReadOnly] = false;
row[SchemaTableOptionalColumn.IsRowVersion] = false;
Index: System.Data.SQLite/SQLiteParameterCollection.cs
==================================================================
--- System.Data.SQLite/SQLiteParameterCollection.cs
+++ System.Data.SQLite/SQLiteParameterCollection.cs
@@ -140,11 +140,11 @@
/// A zero-based index of where the parameter is located in the array
public int Add(SQLiteParameter parameter)
{
int n = -1;
- if (parameter.ParameterName != null)
+ if (String.IsNullOrEmpty(parameter.ParameterName) == false)
{
n = IndexOf(parameter.ParameterName);
}
if (n == -1)
Index: bin/CompactFramework/System.Data.SQLite.DLL
==================================================================
--- bin/CompactFramework/System.Data.SQLite.DLL
+++ bin/CompactFramework/System.Data.SQLite.DLL
cannot compute difference between binary files
Index: bin/CompactFramework/System.Data.SQLite.lib
==================================================================
--- bin/CompactFramework/System.Data.SQLite.lib
+++ bin/CompactFramework/System.Data.SQLite.lib
cannot compute difference between binary files
Index: bin/CompactFramework/testce.exe
==================================================================
--- bin/CompactFramework/testce.exe
+++ bin/CompactFramework/testce.exe
cannot compute difference between binary files
Index: bin/Designer/SQLite.Designer.dll
==================================================================
--- bin/Designer/SQLite.Designer.dll
+++ bin/Designer/SQLite.Designer.dll
cannot compute difference between binary files
Index: bin/Designer/install.exe
==================================================================
--- bin/Designer/install.exe
+++ bin/Designer/install.exe
cannot compute difference between binary files
Index: bin/System.Data.SQLite.XML
==================================================================
--- bin/System.Data.SQLite.XML
+++ bin/System.Data.SQLite.XML
@@ -763,11 +763,11 @@
Closes the datareader, potentially closing the connection as well if CommandBehavior.CloseConnection was specified.
- Disposes the datareader. Calls Close() to ensure everything is cleaned up.
+ Disposes the datareader. Base class calls Close() to ensure everything is cleaned up.
Throw an error if the datareader is closed
@@ -1606,16 +1606,10 @@
Steps through a prepared statement.
The SQLiteStatement to step through
True if a row was returned, False if not.
-
-
- Finalizes a prepared statement.
-
- The statement to finalize
-
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.
@@ -2932,11 +2926,11 @@
Command this statement belongs to (if any)
-
+
Initializes the statement and attempts to get all information about parameters in the statement
The base SQLite object
The statement
Index: bin/System.Data.SQLite.dll
==================================================================
--- bin/System.Data.SQLite.dll
+++ bin/System.Data.SQLite.dll
cannot compute difference between binary files
Index: bin/System.Data.SQLite.lib
==================================================================
--- bin/System.Data.SQLite.lib
+++ bin/System.Data.SQLite.lib
cannot compute difference between binary files
Index: bin/itanium/System.Data.SQLite.DLL
==================================================================
--- bin/itanium/System.Data.SQLite.DLL
+++ bin/itanium/System.Data.SQLite.DLL
cannot compute difference between binary files
Index: bin/itanium/System.Data.SQLite.lib
==================================================================
--- bin/itanium/System.Data.SQLite.lib
+++ bin/itanium/System.Data.SQLite.lib
cannot compute difference between binary files
Index: bin/test.exe
==================================================================
--- bin/test.exe
+++ bin/test.exe
cannot compute difference between binary files
Index: bin/x64/System.Data.SQLite.DLL
==================================================================
--- bin/x64/System.Data.SQLite.DLL
+++ bin/x64/System.Data.SQLite.DLL
cannot compute difference between binary files
Index: bin/x64/System.Data.SQLite.lib
==================================================================
--- bin/x64/System.Data.SQLite.lib
+++ bin/x64/System.Data.SQLite.lib
cannot compute difference between binary files
Index: readme.htm
==================================================================
--- readme.htm
+++ readme.htm
@@ -3,12 +3,12 @@
ADO.NET 2.0 SQLite Data Provider
- Version 1.0.39.1 January 11, 2007
- Using SQLite 3.3.10
+ Version 1.0.41.0 Beta April 23, 2007
+ Using SQLite 3.3.16
Written by Robert Simpson (robert@blackcastlesoft.com)
Released to the public domain, use at your own risk!
Official provider website: http://sqlite.phxsoftware.com
The latest version can be downloaded
@@ -117,10 +117,27 @@
at the sqlite.org website. Several additional pieces are compiled on top of
it to extend its functionality, but the core engine's source is not changed.
Version History
+ 1.0.41.0 - April 23, 2007
+
+ - Code merge with SQLite 3.3.16
+ - Second go at implementing proper finalizers to cleanup after folks who've forgotten to Dispose() of the SQLite objects
+ - Enhanced GetSchema(IndexColumns) to provide numeric scale and precision values
+ - Fixed the column ordinals in GetSchema(IndexColumns) to report the ordinal of the column in the index, not the table
+ - Fixed a bug whereby parameters named with an empty string (such as String.Empty) were treated like a named parameter instead of an unnamed parameter
+
+ 1.0.40.0 - January 31, 2007
+
+ - Code merge with SQLite 3.3.12
+ - Lots of new code to handle misuse of the library. Implemented finalizers
+ where it made sense, fixed numerous garbage collector issues when objects are not
+ disposed properly, fixed some object lifetime issues, etc.
+ - A failed Commit() on a transaction no longer leaves the transaction in an unusable
+ state.
+
1.0.39.1 - January 11, 2007
- Fixed a really dumb mistake that for some reason didn't trigger any errors in
the testcases, whereby commands when associated with a connection were not adding
or removing themselves from an internal list of commands for that connection --