public void SQLiteSaveConfigurationSetting()
{
//--Path and table names
//--This reads the value of data form db lets use list for storing the data
string chartTableName = "tbl_" + selectedBuildingList[0].BuildingName + "_chart_detail";
string nodeTableName = "tbl_" + selectedBuildingList[0].BuildingName + "_node_value";
string lineTableName = "tbl_" + selectedBuildingList[0].BuildingName + "_line_value";
string tableNameDevice = "tbl_" + selectedBuildingList[0].BuildingName + "_device_info_for_node";//currentNodeTableFromDB;
string tableForComfortZoneSetting = "tbl_" + selectedBuildingList[0].BuildingName + "_chart_comfort_zone_setting";
string tableForCF_Detail = "tbl_" + selectedBuildingList[0].BuildingName + "_comfort_zone_detail";
string tableFor_mix_node_info= "tbl_" + selectedBuildingList[0].BuildingName + "_mix_node_info";
//lets get the id values...
string databasePath = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
string databaseFile_x = databasePath + @"\db_psychrometric_project.s3db";
//Reading the data form SQLite DB
ReadDataForSavingConfiguration(databaseFile_x, chartTableName, nodeTableName, lineTableName,tableNameDevice, tableForComfortZoneSetting, tableForCF_Detail, tableFor_mix_node_info);//This reads all the data
string fileName = "";
saveFD.InitialDirectory = "C:";
saveFD.FileName = "SavePsySetting";
saveFD.Filter = "s3db(.s3db) |*.s3db";
//ImageFormat format = ImageFormat.Png;
if (saveFD.ShowDialog() == DialogResult.OK)
{
// Cursor.Current = Cursors.WaitCursor;
fileName = saveFD.FileName;
// Cursor.current = Cursors.WaitCursor;
//saving the file in that path
string databaseFile = fileName;//path + fileName; //databasePath1 + @"\db_psychrometric_project.s3db";
//--Creating file and table details
//--new database file
SQLiteConnection.CreateFile(databaseFile);
//--now lets create the tables
//SQLiteConnection m_dbConnection = new SQLiteConnection("Data Source=" + databaseFile + ";Version=3;");
//m_dbConnection.Open();
CreateTableForSavingConfiguration(databaseFile);
//After the table has been created we can write to the database
//--InsertDataForSavingtoSQLiteDB(string pathWithFileName);
//--Reading data will be done before this so
//---Writing to this db ==>insertion
string chartTableNamex = "tbl_chart_detail";
string nodeTableNamex = "tbl_node_value";
string lineTableNamex = "tbl_line_value";
string tableNameDevicex= "tbl_device_info_for_node";//currentNodeTableFromDB;
string tableForComfortZoneSettingx = "tbl_chart_comfort_zone_setting";
string tableForCF_Detailx = "tbl_comfort_zone_detail";
string tableForMixNode = "tbl_mix_node_info";
InsertForSavingConfiguration(databaseFile, chartTableNamex, nodeTableNamex, lineTableNamex, tableNameDevicex, tableForComfortZoneSettingx, tableForCF_Detailx, tableForMixNode);
// SQLiteConnection.ClearPool();//This helps in
}
}