diff --git a/src/Libraries/Hyena/Hyena.Data.Sqlite/HyenaSqliteConnection.cs b/src/Libraries/Hyena/Hyena.Data.Sqlite/HyenaSqliteConnection.cs
index e3c059d..503568f 100644
--- a/src/Libraries/Hyena/Hyena.Data.Sqlite/HyenaSqliteConnection.cs
+++ b/src/Libraries/Hyena/Hyena.Data.Sqlite/HyenaSqliteConnection.cs
@@ -218,14 +218,14 @@ namespace Hyena.Data.Sqlite
         {
             command.CommandType = HyenaCommandType.Execute;;
             QueueCommand(command);
-            return (int) command.WaitForResult (this);
+            return Convert.ToInt32 (command.WaitForResult (this));
         }
 
         public int Execute (HyenaSqliteCommand command, params object [] param_values)
         {
             command.CommandType = HyenaCommandType.Execute;;
             QueueCommand(command, param_values);
-            return (int) command.WaitForResult (this);
+            return Convert.ToInt32 (command.WaitForResult (this));
         }
 
         public int Execute (string command_str, params object [] param_values)
diff --git a/src/Libraries/Mono.Data.Sqlite/Mono.Data.Sqlite/SQLite3.cs b/src/Libraries/Mono.Data.Sqlite/Mono.Data.Sqlite/SQLite3.cs
index 00bd232..6c86468 100644
--- a/src/Libraries/Mono.Data.Sqlite/Mono.Data.Sqlite/SQLite3.cs
+++ b/src/Libraries/Mono.Data.Sqlite/Mono.Data.Sqlite/SQLite3.cs
@@ -665,7 +665,7 @@ namespace Mono.Data.Sqlite
       }
     }
 
-    internal override int GetLastInsertRowId ()
+    internal override long GetLastInsertRowId ()
     {
 	    return UnsafeNativeMethods.sqlite3_last_insert_rowid (_sql);
     }
diff --git a/src/Libraries/Mono.Data.Sqlite/Mono.Data.Sqlite/SQLiteBase.cs b/src/Libraries/Mono.Data.Sqlite/Mono.Data.Sqlite/SQLiteBase.cs
index 35f7535..25a06f0 100644
--- a/src/Libraries/Mono.Data.Sqlite/Mono.Data.Sqlite/SQLiteBase.cs
+++ b/src/Libraries/Mono.Data.Sqlite/Mono.Data.Sqlite/SQLiteBase.cs
@@ -177,7 +177,7 @@ namespace Mono.Data.Sqlite
     internal abstract void SetCommitHook(SqliteCommitCallback func);
     internal abstract void SetRollbackHook(SqliteRollbackCallback func);
 
-    internal abstract int GetLastInsertRowId ();
+    internal abstract long GetLastInsertRowId ();
     
     internal abstract object GetValue(SqliteStatement stmt, int index, SqliteType typ);
 
diff --git a/src/Libraries/Mono.Data.Sqlite/Mono.Data.Sqlite/SQLiteCommand.cs b/src/Libraries/Mono.Data.Sqlite/Mono.Data.Sqlite/SQLiteCommand.cs
index f954b74..759266e 100644
--- a/src/Libraries/Mono.Data.Sqlite/Mono.Data.Sqlite/SQLiteCommand.cs
+++ b/src/Libraries/Mono.Data.Sqlite/Mono.Data.Sqlite/SQLiteCommand.cs
@@ -648,7 +648,7 @@ namespace Mono.Data.Sqlite
       return new SqliteCommand(this);
     }
 
-    public int LastInsertRowID ()
+    public long LastInsertRowID ()
     {
 	    return _cnn.LastInsertRowId;
     }
diff --git a/src/Libraries/Mono.Data.Sqlite/Mono.Data.Sqlite/SQLiteConnection.cs b/src/Libraries/Mono.Data.Sqlite/Mono.Data.Sqlite/SQLiteConnection.cs
index aa9b0ed..f6f6263 100644
--- a/src/Libraries/Mono.Data.Sqlite/Mono.Data.Sqlite/SQLiteConnection.cs
+++ b/src/Libraries/Mono.Data.Sqlite/Mono.Data.Sqlite/SQLiteConnection.cs
@@ -1957,7 +1957,7 @@ namespace Mono.Data.Sqlite
       get { return 3; }
     }
 
-    public int LastInsertRowId {
+    public long LastInsertRowId {
 	get { return _sql.GetLastInsertRowId (); }
     }
 
diff --git a/src/Libraries/Mono.Data.Sqlite/Mono.Data.Sqlite/UnsafeNativeMethods.cs b/src/Libraries/Mono.Data.Sqlite/Mono.Data.Sqlite/UnsafeNativeMethods.cs
index 3ff2498..6ad9d91 100644
--- a/src/Libraries/Mono.Data.Sqlite/Mono.Data.Sqlite/UnsafeNativeMethods.cs
+++ b/src/Libraries/Mono.Data.Sqlite/Mono.Data.Sqlite/UnsafeNativeMethods.cs
@@ -305,7 +305,7 @@ namespace Mono.Data.Sqlite
     internal static extern int sqlite3_table_cursor(IntPtr stmt, int db, int tableRootPage);
     
     [DllImport(SQLITE_DLL)]
-    internal static extern int sqlite3_last_insert_rowid(IntPtr db);
+    internal static extern long sqlite3_last_insert_rowid(IntPtr db);
   }
 }
 #endif
