get error cannot find table although database already in correct path!. I also already put SQLite.Interop.dll on my project file

Edited 5 Years Ago by ara_tul87: wrong spelling

SQLiteConnection conn = new SQLiteConnection();
            //SQLiteDataAdapter da;
            SQLiteCommandBuilder cb;
            DataTable dt=new DataTable();
            int row = 0;
            conn.ConnectionString = "Data Source=C:\\database\\info";
            conn.Open();--->error here

            DataRow dr = dt.NewRow();
            dr["name"] = txtName.Text;
            dr["address"] = txtAddress.Text;
            dr["phone"] = txtPhone.Text;
            dr["position"] = txtPosition.Text;

            row = dt.Rows.Count - 1;
            txtName.Text = dt.Rows[row]["name"].ToString();
            txtAddress.Text = dt.Rows[row]["address"].ToString();
            txtPhone.Text = dt.Rows[row]["phone"].ToString();
            txtPosition.Text = dt.Rows[row]["position"].ToString();

            cb = new SQLiteCommandBuilder(da);

Are you giving the full file name (e.g. info.db) or literally as you have it here - Data Source=C:\\database\\info?

yes, that is full path name... I already use info database to at my windows form application and it's work well but when i reuse that database on windows mobile it's not working...
any idea?

Is "cannot find table" the exact error message you are getting? Because at the point you stay you are getting the error (opening the connection) it shouldn't be locating a particular table it should be attempting to connect to the database.

Sorry about that, the exactly error is Unable to open database error

This article has been dead for over six months. Start a new discussion instead.