asked on
public static List<object> GetAllTags()
{
List<object> tempTagList = new List<object>();
m_dbConnection.Open();
string sql = "select tagname from tags order by tagname asc";
SQLiteCommand command = new SQLiteCommand(sql, m_dbConnection);
SQLiteDataReader query = command.ExecuteReader(); ///////////////////////////////////////////// EXCEPTION GETS RAISED ON THIS LINE ////////////////////////////////////
while (query.Read())
{
string temp = query.GetString(0);
tempTagList.Add(temp);
}
m_dbConnection.Close();
return tempTagList;
}
public static class DataHelper
{
public static string DB_FILENAME = @"Data Source=C:\Users\ENDER\Desktop\DCT\DCT\bin\Debug\CBDB.db;";
private static SQLiteConnection m_dbConnection = new SQLiteConnection(DB_FILENAME);
...
...
}