title: Need to load a DLL to use SQLiteWrapper in C#
body: <p>I am trying to access my databases in C#. The databases are SQLite and I am trying to access it like so:</p>
  
  <pre><code>string CurrentDatabase = Path.FullName + "\\stock.sqlite";
  
  SQLiteBase db = new SQLiteBase(CurrentDatabase);
  </code></pre>
  
  <p>I am using a SQLite DLL I found here to access the database:</p>
  
  <p><a href="http://www.codeproject.com/KB/database/cs_sqlitewrapper.aspx" rel="nofollow noreferrer">http://www.codeproject.com/KB/database/cs_sqlitewrapper.aspx</a></p>
  
  <p>But I get this error:</p>
  
  <blockquote>
    <p>Unable to load DLL 'sqlite3': The
    specified module could not be found.
    (Exception from HRESULT: 0x8007007E)</p>
  </blockquote>
  
  <p>I think I know what's wrong, I dont have the <code>sqlite3</code> DLL anywhere on my system... but I would like this application to be portable so I cannot expect users to already have this DLL installed. I have read about loading a DLL from another application which has already got this DLL somewhere, Firefox is a good example. It's installed on all of my companies machines and if I could some how load the <code>sqlite3</code> DLL from the Firefox Program Files directory into my application it should work perfectly, no? If that's really the solution I'll need help actually loading the DLL, as I don't know how to do that.</p>
  
  <p>Thanks.</p>