title: Accessing Sqlite Database from Windows Forms Application in C++
body: <p>I am new to C++ (was previously into Java) and I am trying to find my way around it for the past few days. I am having a Sqlite DB in my local Machine which I am trying to access in order to display the results of a query on a Windows Application Form using DataGridView.</p>
  
  <p>I was able to locate a good place to start <a href="https://msdn.microsoft.com/en-us/library/fbk67b6z%28v=vs.110%29.aspx?cs-save-lang=1&amp;cs-lang=cpp&amp;f=255&amp;MSPPError=-2147217396#code-snippet-1" rel="nofollow">here</a> but later discovered that this was more concentrated towards SQL server and not SQLite and the code failed when I tried to replace this part of code </p>
  
  <pre><code>String^ connectionString = 
                  "Integrated Security=SSPI;Persist Security Info=False;" +
                  "Initial Catalog=Northwind;Data Source=localhost";
  </code></pre>
  
  <p>with this</p>
  
  <pre><code>String^ connectionString = "Data Source=C:\\data\\test.db"
  </code></pre>
  
  <p>to point to my local Sqlite DB (test.db).</p>
  
  <p>Upon more digging I found that I was able to find C# examples for linking SQLite DB to Windows Form Application <a href="http://www.codeproject.com/Tips/988690/WinForms-WPF-Using-SQLite-DataBase" rel="nofollow">here</a>. Next I tried to convert the C# code provided into a C++ one but failed.</p>
  
  <p>I have been looking all around for simple C++ examples which would help me understand how to link a Sqlite DB to a Windows Form Application but am not able to do so yet.</p>
  
  <p>I would appreciate it greatly if anyone could point me to one such example.</p>