Click here to Skip to main content
15,884,176 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am using addin express tool for crate addin for ms outlook,word,excel
i wanna use sqllite database for that but ist is showing error
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.


What I have tried:

<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
 </startup>
 <startup useLegacyV2RuntimeActivationPolicy="true" />
in app.config

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();
       }
Posted
Updated 7-Dec-17 21:55pm

1 solution

Download the dotnet v2 DLL files for Sqlite : [^]
 
Share this answer
 
Comments
Mehdi Gholam 8-Dec-17 6:12am    
The title literally says "Setups for 32-bit Windows (.NET Framework 2.0 SP2)"
Member 12861448 8-Dec-17 8:01am    
Sir i have add in my project but now also it is not working...
Mehdi Gholam 8-Dec-17 9:36am    
If you are compiling to "any cpu" and deploying to a 64bit system then you must install the 64bit version of SQLite.
Member 12861448 9-Dec-17 2:25am    
thanks sir..that is resolved but i have another error SQL logic error or missing database how can i resolve this please i am new for sqlite database

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900