1

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 no such table:..Tablename

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

1 Answer 1

2

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.

Sign up to request clarification or add additional context in comments.

1 Comment

Its a 4KB database ... and neither ... but thanks for the help

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.