【发布时间】:2017-03-18 07:13:12
【问题描述】:
我想索引 Internet Explorer 中的所有用户操作和网站。我了解 Internet Explorer 索引 sqlLite 数据库中的所有数据。如何在我自己的应用程序中以编程方式访问 Internet Explorer 网络历史记录
SQLiteConnection conn = new SQLiteConnection(@"Data Source= C:\Users\47\AppData\Local\Microsoft\Internet Explorer\IECompatData\iecompatdata ");
conn.Open();
SQLiteCommand cmd = new SQLiteCommand();
cmd.Connection = conn;
// cmd.CommandText = "SELECT name FROM sqlite_master WHERE type='table' ORDER BY name;";
// Use the above query to get all the table names
cmd.CommandText = "select url,title,visit_count,datetime(last_visit_time / 1000000 + (strftime('%s', '1601-01-01')), 'unixepoch'),typed_count from urls order by last_visit_time desc";
//"Select * From urls order by last_visit_time desc";
DataSet ds = new DataSet();
SQLiteDataReader dr = cmd.ExecuteReader();
while (dr.Read())
{
dataGridView1.Rows.Add(dr[0].ToString(),dr[1].ToString(), dr[2].ToString(), dr[3].ToString(), dr[4].ToString());
}
我尝试了上面的代码,但是得到了一个像
这样的异常System.Data.SQLiteException{"SQL 逻辑错误或缺少数据库\r\nno 这样的表:urls"}
我刚刚验证了其他一些位置,例如 C:\Users\47\AppData\Local\Microsoft\Internet Explorer\Recovery 那些也不起作用 我认为这是因为 IE 历史记录位置或表名...
【问题讨论】:
-
在此路径下,我只看到一个 XML,其中包括为旧 IE 版本模拟的站点。为什么你认为 IE 使用 SQLite?
-
我真的不知道我使用 SQLite 从 IE 获取了 URL 历史记录。我没有找到任何其他解决方案
-
查看历史记录:C:\Users\47\AppData\Local\Microsoft\Windows\History
-
我试过 C:\Users\47\AppData\Local\Microsoft\Windows\History 这个位置并得到异常 {"unable to open database file"}
-
再说一遍,IE 不使用 SQLite
标签: c# winforms visual-studio internet-explorer