Click here to Skip to main content
15,851,387 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi all

i am implementing a window application for getting firefox browsing history.
i know that task complete by open or access "placess.sqlite" in c#.net
but i have problem to access or open places.sqlite through c# i use the code below :

using system.data.sqlite;

SQLiteConnection sql_con;
SQLiteCommand sql_cmd;
SQLiteDataAdapter DB;
DataTable DT = new DataTable();

string dbpath="C:\Users\administrator\AppData\Roaming\Mozilla\Firefox\Profiles\2f92gtpv.default\places.sqlite"

sql_con = new SQLiteConnection("Data Source=" + dbPath +
";Version=3;New=False;Compress=True;");

// Open the Connection
sql_con.Open();
sql_cmd = sql_con.CreateCommand();

// Select Query
string CommandText = "select * from " + table;


but when open the connection i got error:File opened that is not a database file
file is encrypted or is not a database

even places.sqlite database is perfectly open in sqlite manger and i can write query there and its provide result in well maner

if anyone have any solution please provide perfect solution

thanx & regards
Sanjay
Posted

 
Share this answer
 
Comments
sanjaysolanki 27-Dec-13 4:31am    
dear Gitanjali Singh
Tiny Warpper Class Provide Url History Only for Ie Browser and local drive visit. its not provide chrom,firefox etc browsers history.please provide any help or suggetions if you have
Gitanjali Singh 27-Dec-13 4:43am    
http://hardcodedblog.blogspot.in/2009/10/obtaining-browser-visited-url-history.html

Try this
shahed.sohail 24-Mar-14 6:53am    
Do you have the file already open in SQLite manager? Maybe it's locking the file before C# can open it
Do you have the file already open in SQLite manager? Maybe it's locking the file before C# can open it 
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900