Click here to Skip to main content
15,434,147 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
code behind code

private void insertconnect_Click(object sender, EventArgs e)
// [snip] - As C# is purely object-oriented the following lines must be put into a class:

// We use these three SQLite objects:
SQLiteConnection sqlite_conn;
SQLiteCommand sqlite_cmd;
SQLiteDataReader sqlite_datareader;

sqlite_conn = new SQLiteConnection(); // Create an instance of the object
sqlite_conn.ConnectionString = "Data Source=c:\\eminosoft.db;Version=3;New=True;Compress=True;"; // Set the ConnectionString
sqlite_conn.Open(); // Open the connection. Now you can fire SQL-Queries

// create a new SQL command:
sqlite_cmd = sqlite_conn.CreateCommand();

harshavardhan12345678 18-Sep-14 1:46am    
Error is Unable to open the Database file
Bernhard Hiller 18-Sep-14 3:15am    
You asked that qeustion 4 times during the last 24 hours!

You have to set read/write rights on its folder not just the file.

See here.[^]
Share this answer
i only solved my self

error is "Data Source=c:\\eminosoft.db;Version=3;New=True;Compress=True;";

Answer is @"Data Source=c:\\here we have to take path;Version=3;New=True;Compress=True;";
then issue solved
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