diff options
author | Justin Clark-Casey (justincc) | 2010-04-23 18:56:50 +0100 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2010-04-23 18:56:50 +0100 |
commit | e84cc2f9db9e03a45f9fa315cf598dd5ef83b7ef (patch) | |
tree | 4c07c2f614640afd4dfc3a1bf2594ad369837908 /OpenSim/Data/SQLiteNG/SQLiteFriendsData.cs | |
parent | Duplicate OpenSim.Data.SQLite into OpenSim.Data.SQLiteNG. SQLiteNG will shor... (diff) | |
download | opensim-SC-e84cc2f9db9e03a45f9fa315cf598dd5ef83b7ef.zip opensim-SC-e84cc2f9db9e03a45f9fa315cf598dd5ef83b7ef.tar.gz opensim-SC-e84cc2f9db9e03a45f9fa315cf598dd5ef83b7ef.tar.bz2 opensim-SC-e84cc2f9db9e03a45f9fa315cf598dd5ef83b7ef.tar.xz |
Change SQLiteNG to work with mono 2.6 and above using the Mono.Data.Sqlite.dll
Include the library so that Windows builds correctly
It appears that Windows is okay with either SQLite or SQLiteNG
Incorporate the latest fixes made by Diva to OpenSim.Data.SQLite
Diffstat (limited to 'OpenSim/Data/SQLiteNG/SQLiteFriendsData.cs')
-rw-r--r-- | OpenSim/Data/SQLiteNG/SQLiteFriendsData.cs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/OpenSim/Data/SQLiteNG/SQLiteFriendsData.cs b/OpenSim/Data/SQLiteNG/SQLiteFriendsData.cs index 0b12182..b06853c 100644 --- a/OpenSim/Data/SQLiteNG/SQLiteFriendsData.cs +++ b/OpenSim/Data/SQLiteNG/SQLiteFriendsData.cs | |||
@@ -31,7 +31,7 @@ using System.Collections.Generic; | |||
31 | using System.Data; | 31 | using System.Data; |
32 | using OpenMetaverse; | 32 | using OpenMetaverse; |
33 | using OpenSim.Framework; | 33 | using OpenSim.Framework; |
34 | using Mono.Data.SqliteClient; | 34 | using Mono.Data.Sqlite; |
35 | 35 | ||
36 | namespace OpenSim.Data.SQLite | 36 | namespace OpenSim.Data.SQLite |
37 | { | 37 | { |
@@ -47,7 +47,7 @@ namespace OpenSim.Data.SQLite | |||
47 | SqliteCommand cmd = new SqliteCommand(); | 47 | SqliteCommand cmd = new SqliteCommand(); |
48 | 48 | ||
49 | cmd.CommandText = String.Format("select a.*,case when b.Flags is null then -1 else b.Flags end as TheirFlags from {0} as a left join {0} as b on a.PrincipalID = b.Friend and a.Friend = b.PrincipalID where a.PrincipalID = :PrincipalID", m_Realm); | 49 | cmd.CommandText = String.Format("select a.*,case when b.Flags is null then -1 else b.Flags end as TheirFlags from {0} as a left join {0} as b on a.PrincipalID = b.Friend and a.Friend = b.PrincipalID where a.PrincipalID = :PrincipalID", m_Realm); |
50 | cmd.Parameters.Add(":PrincipalID", userID.ToString()); | 50 | cmd.Parameters.AddWithValue(":PrincipalID", userID.ToString()); |
51 | 51 | ||
52 | return DoQuery(cmd); | 52 | return DoQuery(cmd); |
53 | 53 | ||
@@ -58,8 +58,8 @@ namespace OpenSim.Data.SQLite | |||
58 | SqliteCommand cmd = new SqliteCommand(); | 58 | SqliteCommand cmd = new SqliteCommand(); |
59 | 59 | ||
60 | cmd.CommandText = String.Format("delete from {0} where PrincipalID = :PrincipalID and Friend = :Friend", m_Realm); | 60 | cmd.CommandText = String.Format("delete from {0} where PrincipalID = :PrincipalID and Friend = :Friend", m_Realm); |
61 | cmd.Parameters.Add(":PrincipalID", principalID.ToString()); | 61 | cmd.Parameters.AddWithValue(":PrincipalID", principalID.ToString()); |
62 | cmd.Parameters.Add(":Friend", friend); | 62 | cmd.Parameters.AddWithValue(":Friend", friend); |
63 | 63 | ||
64 | ExecuteNonQuery(cmd, cmd.Connection); | 64 | ExecuteNonQuery(cmd, cmd.Connection); |
65 | 65 | ||