I've created a database an a table ("Mail") having 2 columns: id INTEGER, content INTEGER. In my aplication I have tested the connection and it works well.
using Finisar.SQLite;
...
string db = "mydatabase";
SQLiteConnectionsql_con = new SQLiteConnection("Data Source=" + db + ";Version=3;New=False;Compress=True;");
sql_con.Open();
sql_con.Close();
After this I have alter the table "Mail" and it look like this: id INTEGER, content INTEGER, accountid INTEGER. When I tryed the connection again the next error was show: UNSUPORTED FILE FORMAT.
This mean that I can't modify any table?
Please make me understand.
Thanks!
While it may not be required, it is a good practise to name your database files with an .db extension (like "mydatabase.db").
However, in this case, it seems that altering your table via the SQLite(3? 2?).exe command, or an external administrator, turns your DB unreadable by Finisar's library. I advise you to download the succesor of the SQLite .Net library from Sourceforge, since it is compatible with the latest SQLite version. Dont forget to import the System.Data.SQLite.dll file into your project and to change your references from Finisar.SQLite to System.Data.SQLite.
Also, if you install the ADO.NET 2.0 libary, you might want to add design time support for Visual Studio 2008 so you van edit tables via the server explorer.