Skip to content

Instantly share code, notes, and snippets.

@ironpythonbot
Created September 28, 2013 06:56
Show Gist options
  • Save ironpythonbot/6739314 to your computer and use it in GitHub Desktop.
Save ironpythonbot/6739314 to your computer and use it in GitHub Desktop.
CodePlex Issue #32884 Plain Text Attachments
diff --git a/Languages/IronPython/IronPython.SQLite/Statement.cs b/Languages/IronPython/IronPython.SQLite/Statement.cs
index 2d0303a..a6febb9 100644
--- a/Languages/IronPython/IronPython.SQLite/Statement.cs
+++ b/Languages/IronPython/IronPython.SQLite/Statement.cs
@@ -185,6 +185,8 @@ namespace IronPython.SQLite
rc = Sqlite3.sqlite3_bind_int64(st, index, (long)arg);
else if(arg is Microsoft.Scripting.Math.BigInteger)
rc = Sqlite3.sqlite3_bind_int64(st, index, ((Microsoft.Scripting.Math.BigInteger)arg).ToInt64());
+ else if(arg is System.Numerics.BigInteger)
+ rc = Sqlite3.sqlite3_bind_int64(st, index, (long)((System.Numerics.BigInteger)arg));
else if(arg is float)
rc = Sqlite3.sqlite3_bind_double(st, index, (float)arg);
else if(arg is double)
@@ -203,7 +205,7 @@ namespace IronPython.SQLite
rc = Sqlite3.sqlite3_bind_blob(this.st, index, bytes, -1, Sqlite3.SQLITE_TRANSIENT);
}
else
- throw PythonSQLite.MakeInterfaceError("Unable to bind parameter {0} - unsupported type".Format(index));
+ throw PythonSQLite.MakeInterfaceError("Unable to bind parameter {0} - unsupported type {1}".Format(index, arg.GetType()));
if(rc != Sqlite3.SQLITE_OK)
throw PythonSQLite.MakeInterfaceError("Unable to bind parameter {0}: {1}".Format(index, Sqlite3.sqlite3_errmsg(db)));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment