WP7 Sqlite unable to open database file

Mar 15, 2012 at 10:35 AM
Edited Mar 15, 2012 at 10:40 AM

Dear All :

When I come in to ("cmd.ExecuteReader()") in second time this exception came up.

This problem puzzled me so much,somebody who can help me?

Here Is My Code:

//Sqlite Create SqliteConnection 
SqliteConnection conn = new SqliteConnection("Version=3,uri=file:test_data.db");
cmd.CommandText = "SELECT * FROM kline_view";
using (SqliteDataReader reader = cmd.ExecuteReader())
   {
      while (reader.Read())
      {
          int key = reader.GetInt32(0);
          string dt = reader.GetString(1);
          string dataItem = reader.GetString(2);
       }
   }

 Thanks,

              David Jhonson

Aug 15, 2012 at 8:29 AM

try to use DBHELPER.... make this site as reference http://dotnetslackers.com/articles/silverlight/Windows-Phone-7-Native-Database-Programming-via-Sqlite-Client-for-Windows-Phone.aspx ........