How to open a file with the .db extension of SQLite database?
I have downloaded a DB Browser For SQLite. When I tried opening the database file, a new window popped up which is 'Titled SQLCipher Encryption' asking a password used to encrypt and file size (Confused With What Exactly 'File Size'..?).
I have an Application Source Code that I Managed To Find Password & tried with default Page Size 1024.
Tried Several times but unable to open.
public void ReadRecord(string sql)
{
try
{
this.sqlite_cmd.CommandText = this.cSql;
this.sqlite_datareader = this.sqlite_cmd.ExecuteReader();
if (this.sqlite_datareader.Read())
{
this.sAddEdit = "E";
this.txt1.Tag = this.sqlite_datareader["id"];
this.txt1.Text = this.sqlite_datareader["f0"].ToString();
this.txt2.Text = this.sqlite_datareader["f1"].ToString();
this.txt3.Text = this.sqlite_datareader["f2"].ToString();
this.txt4.Text = this.sqlite_datareader["f3"].ToString();
this.txt5.Text = this.sqlite_datareader["f4"].ToString();
this.dtpListDate.Text = this.sqlite_datareader["f5"].ToString();
this.txt7.Text = this.sqlite_datareader["f6"].ToString();
this.txt8.Text = this.sqlite_datareader["f7"].ToString();
this.txt9.Text = this.sqlite_datareader["f8"].ToString();
this.txt10.Text = this.sqlite_datareader["f9"].ToString();
this.txt11.Text = this.sqlite_datareader["f10"].ToString();
this.txt12.Text = this.sqlite_datareader["f11"].ToString();
this.txt13.Text = this.sqlite_datareader["f12"].ToString();
this.txt14.Text = this.sqlite_datareader["f13"].ToString();
this.txt15.Text = this.sqlite_datareader["f14"].ToString();
this.txt16.Text = this.sqlite_datareader["f15"].ToString();
this.txt17.Text = this.sqlite_datareader["f16"].ToString();
this.txt18.Text = this.sqlite_datareader["f17"].ToString();
this.txt19.Text = this.sqlite_datareader["f18"].ToString();
this.txt20.Text = this.sqlite_datareader["f19"].ToString();
this.txt21.Text = this.sqlite_datareader["f20"].ToString();
this.txt22.Text = this.sqlite_datareader["f21"].ToString();
this.txt23.Text = this.sqlite_datareader["f22"].ToString();
this.txt24.Text = this.sqlite_datareader["f23"].ToString();
this.txt25.Text = this.sqlite_datareader["f24"].ToString();
this.txt26.Text = this.sqlite_datareader["f25"].ToString();
this.txt27.Text = this.sqlite_datareader["f26"].ToString();
this.txt28.Text = this.sqlite_datareader["f27"].ToString();
this.txt29.Text = this.sqlite_datareader["f28"].ToString();
this.txt30.Text = this.sqlite_datareader["f29"].ToString();
}
this.sqlite_datareader.Close();
}
catch (Exception exception)
{
MessageBox.Show("A Error" + exception.ToString() + " Occcured Please Try Again or contact supplier", "Error", MessageBoxButtons.OK, MessageBoxIcon.Hand);
}
}
In namespace,
using Microsoft.VisualBasic.PowerPacks;
using System;
using System.ComponentModel;
using System.Data;
using System.Data.SQLite;
using System.Drawing;
using System.IO;
using System.Windows.Forms;
try/catch (Exception)like that is a bad anti-pattern. Have a read of Eric Lippert's Vexing Exceptions.