mardi 13 janvier 2015

Install App: Error Sqlite Exception..no such table

I am new to VS 2013 Express. Excuse for my english :)


First: my WinForm application runs correctly in VS Express. Ok.


But, when I publish the app and tryng to install (on my pc....), it displays an error like this: Error Sqlite Exception..no such table:Tabella....ComboFill().


I 've created and fill a s3DB with SQLITE ADMIN manager


This is a part of my code:



private void ComboFill()
{
try
{
var conn = new SQLiteConnection("Data Source =ComuniDB.s3db;Version=3;");
conn.Open();
SQLiteDataAdapter DataAdapter = new SQLiteDataAdapter("SELECT * FROM Tabella", conn);
DataSet ds = new DataSet();
DataAdapter.Fill(ds);
conn.Close();
int size_arr = ds.Tables[0].Rows.Count; //this will give you the size of your array
string[] arrLuogo = new string[size_arr];
int i = 0;
foreach (DataRow dr in ds.Tables[0].Rows) //loop through the rows
{
//tag description is my field in the database
arrLuogo[i] = Convert.ToString(dr["Luogo"]);
if (arrLuogo[i] != "")
{
String withoutLastSpaces = arrLuogo[i].TrimEnd();
arrLuogo[i] = withoutLastSpaces;
}

i++;
}

cboLuogo.Items.AddRange(arrLuogo);
}
catch (SystemException ex)
{
MessageBox.Show(ex.ToString(), "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
}


The debug says :"The program '[5932] Codice Fiscale.vshost.exe' has exited with code 0 (0x0)."


I don't understand.. :(


For information, I use "debug: any CPU" and "target: X86" and I have a win 8.1 pc Thanks for help. Mauro


Aucun commentaire:

Enregistrer un commentaire