summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjeroenwalter <jeroen@enormkansloos.nl>2015-05-09 14:22:22 +0200
committerjeroenwalter <jeroen@enormkansloos.nl>2015-05-09 14:22:22 +0200
commit68528347404ff3ca2492107bb15f30416332a131 (patch)
tree6d07e9ac70af6ef2d9d9ed73312178b05ba9284a
parenta71fca25625601db132331fcaed9c82ccb725382 (diff)
downloadComicRackWeb-68528347404ff3ca2492107bb15f30416332a131.zip
ComicRackWeb-68528347404ff3ca2492107bb15f30416332a131.tar.gz
ComicRackWeb-68528347404ff3ca2492107bb15f30416332a131.tar.bz2
removed obsolete methods
-rw-r--r--ComicRackWebViewer/BCRDatabase.cs83
1 files changed, 5 insertions, 78 deletions
diff --git a/ComicRackWebViewer/BCRDatabase.cs b/ComicRackWebViewer/BCRDatabase.cs
index ab8711d..50924cb 100644
--- a/ComicRackWebViewer/BCRDatabase.cs
+++ b/ComicRackWebViewer/BCRDatabase.cs
@@ -311,91 +311,18 @@ namespace BCR
}
-/*
-public static List<dynamic> AsDynaList(ADODB.Recordset recordset)
-{
-
- List<dynamic> rs = new List<dynamic>();
- while (!recordset.EOF)
- {
- var fieldIndex = 0;
- var test = new ExpandoObject() as IDictionary<string, object>;
-
- foreach (ADODB.Field fld in recordset.Fields)
- {
- test.Add(fld.Name, recordset.Fields[fieldIndex].Value);
- fieldIndex++;
- }
- rs.Add(test);
- recordset.MoveNext();
- }
- return rs;
-}
-
-
-http://sqlite.phxsoftware.com/forums/p/134/465.aspx#465
-
-http://msdn.microsoft.com/en-us/library/ax3wd0k9%28v=vs.100%29.aspx
-
-http://decoding.wordpress.com/2009/01/14/using-sqlite-with-net/
-
-http://csharp-station.com/Tutorial/AdoDotNet/Lesson05
-
-
- public DataTable GetDataTable(string sql)
-{
-var dt = new DataTable();
-try
-{
-using (var conn = new SQLiteConnection(ConnectionStringHelper.ConnectionString))
-{
-conn.Open();
-SQLiteCommand mycommand = new SQLiteCommand(conn);
-mycommand.CommandText = sql;
-SQLiteDataReader reader = mycommand.ExecuteReader();
-dt.Load(reader);
-reader.Close();
-}
-}
-catch (Exception ex)
-{
-throw ex;
-}
-return dt;
-}
-
-public static DataSet GetDataSet(string sql)
-{
- DataSet ds = new DataSet();
- using (SQLiteConnection conn = new SQLiteConnection(connString))
- {
- conn.Open();
- using (SQLiteCommand cmd = new SQLiteCommand(conn))
+ public void Dispose()
{
- cmd.CommandText = sql;
- cmd.CommandType = CommandType.Text;
- using (SQLiteDataAdapter da = new SQLiteDataAdapter(cmd))
+ if (mConnection != null)
{
- da.Fill(ds);
- return ds;
+ mConnection.Dispose();
+ mConnection = null;
}
}
- }
-}
-
-*/
-
-
- public void Dispose()
- {
- mConnection.Dispose();
- mConnection = null;
- }
~Database()
{
- if (mConnection != null)
- Dispose();
+ Dispose();
}
}