I have a SQLite DB designed using “SQLite Database Browser 2.0 b1” I have used the System.Data.SQLite.
I am using Visual Studio 2010, and have added my DB in the Resources and this is my connection string
sql_con = new SQLiteConnection("Data Source="+CryptoFile.Properties.Resources.Database1+".db;Version=3;New=False;Compress=True;");
it preforms
mySQLconnection.Open();
with no problems it opens the Database…
However .. when I try to process/Execute a Query the following line:
SQLiteDataReader reader = sql_cmd.ExecuteReader();
causes this Error … what might be causing the problem ?
SQLite error..Tablename
no such table:
cause the connection is used over and over the connection part is in 1 function returns the value to SQLite Connection in other forms, so don’t bother with the namings here I have used the Finisar.SQLite…
and all the code has worked before …but because I couldn’t publish the project with the database I have used the System.Data.SQLite
there can be 2 reasons for this problem.
First – connection is made to the right database but there is no such table there.
Second – connection is made to the wrong database. in such case it gives no error. It makes a database file at the specified location. Even Opens the database. but gives this error when fetching data. In such case the specified location will contain a database of 0 KB.