Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
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 .
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 . Smile | :)
 
Thanks in Advance . Smile | :)
Posted 25-May-13 1:23am

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

  Print Answers RSS
0 Maciej Los 205
1 Richard MacCutchan 185
2 DamithSL 170
3 Tomas Takac 146
4 OriginalGriff 132
0 OriginalGriff 5,130
1 DamithSL 4,237
2 Maciej Los 3,700
3 Kornfeld Eliyahu Peter 3,470
4 Sergey Alexandrovich Kryukov 2,846


Advertise | Privacy | Mobile
Web01 | 2.8.141216.1 | Last Updated 25 May 2013
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100