Click here to Skip to main content
15,886,110 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi Friends,

I have created windows application project using C sharp coding. In my project, i will be importing (.db) files using third party of SQLite . For reading the datas from (.db) file im using SQLiteConnection .
XML
SQLiteConnection dataConnection = new SQLiteConnection();

            dataConnection.DataSource = FilePath;

            dataConnection.Open();

            System.Data.DataTable tableschema = new System.Data.DataTable();
 
            SQLiteDataAdapter daTables = new SQLiteDataAdapter("SELECT * FROM sqlite_master WHERE type='table';", dataConnection);
            daTables.Fill(tableschema);


            foreach (DataRow row in tableschema.Rows)
            {
                string strSheetTableName = row["tbl_name"].ToString();

                string Query = "SELECT * FROM [" + strSheetTableName + "] ;";

                System.Data.DataTable dt = new System.Data.DataTable();
                dt.TableName = strSheetTableName;
                SQLiteDataAdapter daDatas = new SQLiteDataAdapter(Query, dataConnection);
                daDatas.Fill(dt);

                ds.Tables.Add(dt);
            }


The above coding is working properly but i am facing the problem is , if i import (.db) file which contains the Table structure as "Virtual Table" its throughing the error as SQLite error , no such module: rtree. If i open the (.db) file in SQLite Manager means , one table is created in below coding format ,
CREATE VIRTUAL TABLE tablename USING rtree(ROWID, MinimumLatitude, MaximumLatitude, MinimumLongitude, MaximumLongitude)


So can any one suggest me to write a select query for the above virtual table . :)

Thanks in Advance . :)
Posted

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