Mixed mode assembly is built against version 'v2.0.50727' of the runtime and cannot be loaded in the 4.0 runtime without additional configuration information.
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" /> </startup> <startup useLegacyV2RuntimeActivationPolicy="true" />
public void connect() { SQLiteConnection sqlite_conn; SQLiteCommand sqlite_cmd=new SQLiteCommand(); SQLiteDataReader sqlite_datareader; sqlite_conn = new SQLiteConnection("Data Source=clients.db;Version=3;New=False;Compress=True;"); sqlite_conn.Open(); sqlite_cmd.CommandText = "SELECT * FROM User"; sqlite_datareader = sqlite_cmd.ExecuteReader(); while (sqlite_datareader.Read()) // Read() returns true if there is still a result line to read { string myreader = sqlite_datareader.GetString(0); MessageBox.Show(myreader); } // We are ready, now lets cleanup and close our connection: sqlite_conn.Close(); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)