title: How to Start with SQlite and .net 4.0?
body: <p>I'm creating an application where simply i'm storing data in DB and getting data from DB. I'm Using SQLite for database.</p>
  
  <p>MainWindows.xaml.cs File</p>
  
  <pre><code>using System.Data.SQLite;
  
  namespace SQLiteSample
   {
  /// &lt;summary&gt;
  /// Interaction logic for MainWindow.xaml
  /// &lt;/summary&gt;
       public partial class MainWindow : Window
       {
           private SQLiteCommand sql_cmd;
          private DataSet DS = new DataSet();
          private DataTable DT = new DataTable();
          private SQLiteDataAdapter DB;
          string myConnectionString = "Data Source=C:\\Documents and Settings\\20024509\\My     Documents\\SQLite\\Enum.db";
          SQLiteConnection myConnection = new SQLiteConnection();
  
          public MainWindow()
          {
               InitializeComponent();
  
            }
  
          private void LoadData()
          {
              try
              {
                  myConnection.ConnectionString = myConnectionString;
                  myConnection.Open();
                  sql_cmd = myConnection.CreateCommand();
                  string CommandText = "select EmpID,EmpName from Employee_Info";
                  DB = new SQLiteDataAdapter(CommandText, myConnection);
                  DS.Reset();
                   DB.Fill(DS);
                  DT = DS.Tables[0];
                  // grid1.DataSource = DT;
                   myConnection.Close();
               }
               catch (Exception e)
               {
                   myConnection.Close();
               }
             }
  
  
           private void SaveData()
           {
               SQLiteConnection myConn = new SQLiteConnection(myConnectionString);
               string myInsertQuery = "INSERT INTO Employee_Info(EmpID,EmpName,EmpAge,EmpSalary) Values(503453535, 'DEVELOPMENT',32987654)";
               SQLiteCommand sqCommand = new SQLiteCommand(myInsertQuery);
                sqCommand.Connection = myConn;
                myConn.Open();
               try
               {
                   sqCommand.ExecuteNonQuery();
                }
                finally
               {
                    myConn.Close();
                }
  
               }
  
            private void  FromDB_Click(object sender, RoutedEventArgs e)
             {
               LoadData();
             }
  
             private void ToDB_Click(object sender, RoutedEventArgs e)
            {
                SaveData();
            }
            }
    }
  </code></pre>
  
  <p>I downloaded Binary for .net from "http://system.data.sqlite.org/index.html/doc/trunk/www/downloads.wiki"(Setups for 32-bit Windows (.NET Framework 4.0) ) and installed it.</p>
  
  <p>Then added reference in my wpf application. But still it's giving Exception</p>
  
  <pre><code>"{"'The invocation of the constructor on type 'SQLiteSample.MainWindow' 
  that matches the specified binding constraints threw an exception.' 
  Line number '3' and line position '9'."}"
  </code></pre>