Note that there are some explanatory texts on larger screens.

plurals
  1. POOpening Firefox file 'places.sqlite' with PowerShell and System.Data.SQLite
    primarykey
    data
    text
    <p>I want to run the following code:</p> <pre><code>$dll = [System.Reflection.Assembly]::LoadWithPartialName("System.Data.SQLite") # [System.Reflection.Assembly]::LoadFrom("C:\Program Files\System.Data.SQLite\bin\System.Data.SQLite.dll") $ConnectionString = "Data Source=C:\Var\sqlite_ff4\places.sqlite" $conn = New-Object System.Data.SQLite.SQLiteConnection $conn.ConnectionString = $ConnectionString $conn.Open() $sql = "SELECT * from moz_bookmarks" $cmd = New-Object System.Data.SQLite.SQLiteCommand($sql, $conn) # $cmd.CommandTimeout = $timeout $ds = New-Object system.Data.DataSet $da = New-Object System.Data.SQLite.SQLiteDataAdapter($cmd) $da.fill($ds) $conn.close() $ds.tables[0] </code></pre> <p>At the line</p> <pre><code>$conn.Open() </code></pre> <p>I get the error</p> <pre><code>Exception calling "Open" with "0" argument(s): "File opened that is not a database file file is encrypted or is not a database" At line:5 char:11 + $conn.Open &lt;&lt;&lt;&lt; () + CategoryInfo : NotSpecified: (:) [], MethodInvocationException + FullyQualifiedErrorId : DotNetMethodException </code></pre> <p>The file <code>places.sqlite</code> is from Firefox 4.0. I'm using <a href="http://sourceforge.net/projects/sqlite-dotnet2/files/" rel="nofollow noreferrer">http://sourceforge.net/projects/sqlite-dotnet2/files/</a>.</p> <p><strong>EDIT:</strong></p> <p>The above works for the Firefox 3.0 file <code>places.sqlite</code>. Something seems to be different with Firefox 4.0.</p> <p>It doesn't seem to be a password problem, but a version problem. Thanks to <a href="https://stackoverflow.com/questions/4706537/firefox-locks-places-sqlite/4804466#4804466">this Stack&nbsp;Overflow post</a> I found, that I need SQLite 3.7.</p> <p>I hope I find some current ADO provider.</p> <p>sqlite-dotnet-x86-1006900.exe from <a href="http://system.data.sqlite.org/index.html/doc/trunk/www/downloads.wiki" rel="nofollow noreferrer">here</a> doesn't work</p> <p>Exception calling "Open" with "0" argument(s): "Unable to load DLL 'SQLite.Inte rop.DLL': The specified module could not be found. (Exception from HRESULT: 0x8 007007E)"</p> <p>It is possibly a debug build. Are there any prebuild version without an SQLite.Interop.DLL?</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload