diff options
author | Diva Canto | 2010-02-20 20:13:38 -0800 |
---|---|---|
committer | Diva Canto | 2010-02-20 20:13:38 -0800 |
commit | df59d098b319367394bdeb898d7fd7dacd7104ec (patch) | |
tree | 04d6b7214a1773a686d6fab6f53e8ecddd6a7bf7 /OpenSim/Data/SQLite/SQLiteFramework.cs | |
parent | Added UserAccountData and auth to the SQLite connector. Compiles, runs, but a... (diff) | |
download | opensim-SC_OLD-df59d098b319367394bdeb898d7fd7dacd7104ec.zip opensim-SC_OLD-df59d098b319367394bdeb898d7fd7dacd7104ec.tar.gz opensim-SC_OLD-df59d098b319367394bdeb898d7fd7dacd7104ec.tar.bz2 opensim-SC_OLD-df59d098b319367394bdeb898d7fd7dacd7104ec.tar.xz |
SQLite connector better, but access to tables still doesn't work.
Diffstat (limited to 'OpenSim/Data/SQLite/SQLiteFramework.cs')
-rw-r--r-- | OpenSim/Data/SQLite/SQLiteFramework.cs | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/OpenSim/Data/SQLite/SQLiteFramework.cs b/OpenSim/Data/SQLite/SQLiteFramework.cs index d745c92..2a8a022 100644 --- a/OpenSim/Data/SQLite/SQLiteFramework.cs +++ b/OpenSim/Data/SQLite/SQLiteFramework.cs | |||
@@ -40,17 +40,12 @@ namespace OpenSim.Data.SQLite | |||
40 | /// </summary> | 40 | /// </summary> |
41 | public class SQLiteFramework | 41 | public class SQLiteFramework |
42 | { | 42 | { |
43 | protected static SqliteConnection m_Connection; | 43 | protected SqliteConnection m_Connection; |
44 | private bool m_initialized; | ||
45 | 44 | ||
46 | protected SQLiteFramework(string connectionString) | 45 | protected SQLiteFramework(string connectionString) |
47 | { | 46 | { |
48 | if (!m_initialized) | 47 | //m_Connection = new SqliteConnection(connectionString); |
49 | { | 48 | //m_Connection.Open(); |
50 | m_Connection = new SqliteConnection(connectionString); | ||
51 | m_Connection.Open(); | ||
52 | m_initialized = true; | ||
53 | } | ||
54 | } | 49 | } |
55 | 50 | ||
56 | ////////////////////////////////////////////////////////////// | 51 | ////////////////////////////////////////////////////////////// |
@@ -63,6 +58,7 @@ namespace OpenSim.Data.SQLite | |||
63 | lock (m_Connection) | 58 | lock (m_Connection) |
64 | { | 59 | { |
65 | cmd.Connection = m_Connection; | 60 | cmd.Connection = m_Connection; |
61 | Console.WriteLine("XXX " + cmd.CommandText); | ||
66 | 62 | ||
67 | return cmd.ExecuteNonQuery(); | 63 | return cmd.ExecuteNonQuery(); |
68 | } | 64 | } |
@@ -75,6 +71,7 @@ namespace OpenSim.Data.SQLite | |||
75 | newConnection.Open(); | 71 | newConnection.Open(); |
76 | 72 | ||
77 | cmd.Connection = newConnection; | 73 | cmd.Connection = newConnection; |
74 | Console.WriteLine("XXX " + cmd.CommandText); | ||
78 | return cmd.ExecuteReader(); | 75 | return cmd.ExecuteReader(); |
79 | } | 76 | } |
80 | 77 | ||