Ladies_Man

CDB latest and final

Oct 3rd, 2016
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 17.53 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Data;
  6. using System.Threading.Tasks;
  7. using System.Collections;
  8. using System.Diagnostics;
  9. using System.IO;
  10.  
  11. using System.Data.SQLite;
  12.  
  13. using MySql.Data;
  14. using MySql.Data.MySqlClient;
  15.  
  16. namespace adonet_4
  17. {
  18.     public class Globals
  19.         {
  20.             private static SortedDictionary<string, List<String>> _mapNameToDataList = new SortedDictionary<string, List<String>>();
  21.             private static List<string> _listTablenames;
  22.  
  23.             public static SortedDictionary<string, List<String>> mapNameToDataList
  24.             {
  25.                 get { return _mapNameToDataList; }
  26.                 set { _mapNameToDataList = value; }
  27.             }
  28.  
  29.             public static List<string> listTableNames
  30.             {
  31.                 get { return _listTablenames; }
  32.                 set { _listTablenames = value; }
  33.             }
  34.         }
  35.  
  36.     class Program
  37.     {
  38.  
  39.         static void execReaderSqlite(SQLiteCommand command)
  40.         {
  41.             try
  42.             {
  43.                 SQLiteDataReader reader = command.ExecuteReader();
  44.                 /*Console.WriteLine("Executing Sqlite reader for query:" + command.CommandText);
  45.                 do
  46.                 {
  47.                     while (reader.Read())
  48.                     {
  49.                         Object[] values = new Object[reader.FieldCount];
  50.                         int fieldCount = reader.GetValues(values);
  51.  
  52.                         for (int i = 0; i < fieldCount; i++)
  53.                         {
  54.                             Console.Write("\t{0}", values[i]);
  55.                         }
  56.                         Console.WriteLine();
  57.                     }
  58.  
  59.                 } while (reader.NextResult());
  60.                 */
  61.                 reader.Close();
  62.  
  63.             }
  64.             catch (Exception e)
  65.             {
  66.                 Console.WriteLine(e.Message);
  67.             }
  68.  
  69.             //Console.WriteLine();
  70.         }
  71.  
  72.         //
  73.         //
  74.         //      P E R E G R O O Z K A
  75.         //
  76.         //
  77.  
  78.  
  79.         static void execReaderMysql(MySqlCommand command)
  80.         {
  81.             try
  82.             {
  83.                 MySqlDataReader reader = command.ExecuteReader();
  84.                 /*Console.WriteLine("Executing Mysql reader for query:" + command.CommandText);
  85.                 do
  86.                 {
  87.                     while (reader.Read())
  88.                     {
  89.                         Object[] values = new Object[reader.FieldCount];
  90.                         int fieldCount = reader.GetValues(values);
  91.  
  92.                         for (int i = 0; i < fieldCount; i++)
  93.                         {
  94.                             Console.Write("\t{0}", values[i]);
  95.                            
  96.                         }
  97.                         Console.WriteLine();
  98.                     }
  99.  
  100.                 } while (reader.NextResult());
  101.                 */
  102.                 reader.Close();
  103.  
  104.             }
  105.             catch (Exception e)
  106.             {
  107.                 Console.WriteLine(e.Message);
  108.             }
  109.  
  110.             //Console.WriteLine();
  111.         }
  112.  
  113.  
  114.         static List<string> retrieveTablenames(SQLiteConnection connection)
  115.         {
  116.             List<string> tmpList = new List<string>();
  117.  
  118.             try
  119.             {
  120.                
  121.                 string q = "SELECT name FROM sqlite_master WHERE type = 'table'";
  122.                 SQLiteCommand cmd = new SQLiteCommand(q, connection);
  123.  
  124.                 SQLiteDataReader reader = cmd.ExecuteReader();
  125.  
  126.                 if (reader.HasRows)
  127.                 {
  128.                     int j = 0;
  129.                     while (reader.Read())
  130.                     {
  131.                         for (int i = 0; i < reader.FieldCount; i++)
  132.                         {
  133.                             string tableName = reader.GetValue(i).ToString();
  134.                             if (tableName.ToLower().Equals("failedtests"))
  135.                             {
  136.                                 continue;
  137.                             }
  138.  
  139.                             tmpList.Add(tableName);
  140.                         }
  141.                         j++;
  142.                     }
  143.                 }
  144.             }
  145.             catch (Exception e)
  146.             {
  147.                 Console.WriteLine(e.Message);
  148.                 Console.ReadLine();
  149.             }
  150.  
  151.             return tmpList;
  152.         }
  153.  
  154.  
  155.         static List<String> retrieveData(string tableName, SQLiteConnection connection)
  156.         {
  157.  
  158.             string q = string.Format("SELECT * FROM {0}", tableName);
  159.             SQLiteCommand cmd = new SQLiteCommand(q, connection);
  160.  
  161.             List<String> data = new List<String>();
  162.  
  163.             try {
  164.                 //Console.WriteLine("\treading table [" + tableName + "]");
  165.  
  166.                 if (null != connection && ConnectionState.Open != connection.State)
  167.                 {
  168.                     connection.Open();
  169.                 }
  170.                 //string q = "SELECT name FROM sqlite_master WHERE type = 'table'";
  171.                 //q = "select * from Persons";
  172.                 //SQLiteCommand cmd = new SQLiteCommand(query, connection);
  173.  
  174.                 SQLiteDataReader reader = cmd.ExecuteReader();
  175.  
  176.                
  177.                 int entryNum = 0;
  178.  
  179.                 if (reader.HasRows)
  180.                 {
  181.                    
  182.                     while (reader.Read())
  183.                     {
  184.                        
  185.                         String entry = "(";
  186.  
  187.                         for (int i = 0; i < reader.FieldCount; i++)
  188.                         {
  189.                             //Console.Write("\t{0}", Convert.ToString(reader[i]));
  190.                             try
  191.                             {
  192.                                 string cellType = reader.GetDataTypeName(i).ToString();
  193.                                 switch (cellType)
  194.                                 {
  195.                                     case "INTEGER":
  196.                                         break;
  197.                                     case "DATETIME":
  198.                                         entry += "'";
  199.                                         break;
  200.                                     default:
  201.                                         entry += "'"; //\"
  202.                                         break;
  203.                                 }
  204.  
  205.                                 string cellValue = reader.GetValue(i).ToString();
  206.                                 cellValue = cellValue.Replace("'", "''");
  207.                                 if (cellValue.Equals(""))
  208.                                 {
  209.                                     entry = entry.Remove(entry.Length - 1);
  210.                                     entry += "null";
  211.                                     goto fuck;
  212.                                 }
  213.  
  214.                                 entry += cellValue;
  215.  
  216.                                 switch (cellType)
  217.                                 {
  218.                                     case "INTEGER":
  219.                                         break;
  220.                                     case "DATETIME":
  221.                                         entry += "'";
  222.                                         break;
  223.                                     default:
  224.                                         entry += "'"; //\"
  225.                                         break;
  226.                                 }
  227.  
  228.                                
  229.                                 fuck:
  230.                                 entry += ", ";
  231.  
  232.                                
  233.                             }
  234.                             catch (Exception e)
  235.                             {
  236.                                 Console.WriteLine(e.Message);
  237.                             }
  238.                    
  239.                         }
  240.  
  241.                         entry = entry.Remove(entry.Length - 2);
  242.                         entry += ")";
  243.  
  244.                         data.Add(entry);
  245.  
  246.                         entryNum++;
  247.  
  248.  
  249.                         if (1 == entryNum)
  250.                         {
  251.                             //Console.WriteLine("\tEntry example: " + entry);
  252.                         }
  253.                     }
  254.                 }
  255.  
  256.                 reader.Close();
  257.  
  258.                 Console.WriteLine("\t" + entryNum + " entries for table [" + tableName + "] has been processed");
  259.  
  260.             }
  261.             catch (SQLiteException e)
  262.             {
  263.                 Console.WriteLine(e.Message);
  264.                 Console.ReadLine();
  265.             }
  266.             finally
  267.             {
  268.                 connection.Close();
  269.             }
  270.  
  271.             return data;
  272.         }
  273.  
  274.  
  275.         static void insertData(String tableName, List<String> data, MySqlConnection connection)
  276.         {
  277.             try
  278.             {
  279.                 Console.WriteLine("\treading table [" + tableName + "]");
  280.  
  281.                 var dataAsString = String.Join(", ", data);
  282.                 Console.WriteLine("\tquery length: " + dataAsString.Length);
  283.  
  284.  
  285.                 if (null != connection && ConnectionState.Open != connection.State)
  286.                 {
  287.                     connection.Open();
  288.                 }
  289.  
  290.                 String q = String.Format("insert into {0} values {1}", tableName, dataAsString);
  291.  
  292.                 MySqlCommand cmd = new MySqlCommand(q, connection);
  293.  
  294.                 cmd.ExecuteNonQuery();
  295.  
  296.             }
  297.             catch (MySqlException e)
  298.             {
  299.                 Console.WriteLine(e.Message);
  300.                 Console.ReadLine();
  301.             }
  302.             finally
  303.             {
  304.                 connection.Close();
  305.             }
  306.         }
  307.  
  308.  
  309.  
  310.  
  311.         static void Main(string[] args)
  312.         {
  313.             int tableNumSqlite = 0, tableNumMysql = 0;
  314.  
  315.             Console.WriteLine("============================================================================");
  316.             Console.WriteLine("---------------------------------SQLITE-------------------------------------");
  317.             Console.WriteLine("============================================================================");
  318.  
  319.             String biqQuerySQLite = null;
  320.             using (StreamReader sr = new StreamReader("contents.sql"))
  321.             {
  322.                 try
  323.                 {
  324.                     biqQuerySQLite = sr.ReadToEnd();
  325.                 }
  326.                 catch (Exception ex)
  327.                 {
  328.                     Console.WriteLine(ex);
  329.                 }
  330.             }
  331.             String biqQueryMySQL = null;
  332.             using (StreamReader sr = new StreamReader("contents_Mysql.sql"))
  333.             {
  334.                 try
  335.                 {
  336.                     biqQueryMySQL = sr.ReadToEnd();
  337.                 }
  338.                 catch (Exception ex)
  339.                 {
  340.                     Console.WriteLine(ex);
  341.                 }
  342.             }
  343.  
  344.  
  345.             string connStringSqlite = @"Data Source=C:\Users\anthony\Documents\tbmstu.db; Version=3; PRAGMA schema.cache_size = 0;";
  346.             string connStringMysql = "Server=localhost;Uid=TokyoNyquiSD;Pwd=qazxsw;Database=tbm3;";
  347.  
  348.  
  349.             Stopwatch stopWatch = new Stopwatch();
  350.             using (SQLiteConnection conn1 = new SQLiteConnection(connStringSqlite))
  351.             {
  352.                 try
  353.                 {
  354.                     conn1.Open();
  355.                     Console.WriteLine("connection to SQLite has been set\n");
  356.                    
  357.                     Console.Write("retrieving tablenames: ");
  358.  
  359.                     Globals.listTableNames = retrieveTablenames(conn1);
  360.                        
  361.                     Console.WriteLine("successfully retrieved\n");
  362.                        
  363.  
  364.                    
  365.                     stopWatch.Start();
  366.                     foreach (string table in Globals.listTableNames)
  367.                     {
  368.                         //Console.WriteLine("retrieving data for table " + ++tableNumSqlite);
  369.                        
  370.                         List<String> data = retrieveData(table, conn1);
  371.                         //Globals.mapNameToDataList.Add(table, data);
  372.                         tableNumSqlite++;
  373.                         //Console.WriteLine("\tdata has been added to map");
  374.                     }
  375.                     stopWatch.Stop();
  376.  
  377.                     Console.WriteLine("\nelapsed time for " + tableNumSqlite + " tables: " + stopWatch.Elapsed.ToString() + "\n");
  378.                 }
  379.                 catch (Exception e)
  380.                 {
  381.                     Console.WriteLine(e.Message);
  382.                 }
  383.             }
  384.  
  385.             double sqliteTime = 0;
  386.             double mysqlTime = 0;
  387.             double amount = 1;
  388.             //for (int i = 0; i < amount; i++)
  389.             //{
  390.                 stopWatch.Reset();
  391.                 using (SQLiteConnection conn1 = new SQLiteConnection(connStringSqlite))
  392.                 {
  393.                     try
  394.                     {
  395.                         conn1.Open();
  396.  
  397.                         stopWatch.Start();
  398.                         execReaderSqlite(new SQLiteCommand(biqQuerySQLite, conn1));
  399.                         stopWatch.Stop();
  400.  
  401.                         conn1.Close();
  402.                     }
  403.                     catch (Exception e)
  404.                     {
  405.                         Console.WriteLine(e.Message);
  406.                     }
  407.                 }
  408.                 sqliteTime += stopWatch.Elapsed.Milliseconds;
  409.  
  410.                 stopWatch.Reset();
  411.                 using (MySqlConnection conn1 = new MySqlConnection(connStringMysql))
  412.                 {
  413.                     try
  414.                     {
  415.                         conn1.Open();
  416.  
  417.                         stopWatch.Start();
  418.                         execReaderMysql(new MySqlCommand(biqQueryMySQL, conn1));
  419.                         stopWatch.Stop();
  420.  
  421.                         conn1.Close();
  422.                     }
  423.                     catch (Exception e)
  424.                     {
  425.                         Console.WriteLine(e.Message);
  426.                     }
  427.                 }
  428.                 mysqlTime += stopWatch.Elapsed.Milliseconds;
  429.             //}
  430.             double avgMysqlTime = (double)mysqlTime / amount;
  431.             double avgSqliteTime = (double)sqliteTime / amount;
  432.             Console.WriteLine("sqliteTimeAvg: " + avgSqliteTime + "ms\n mysqlTimeavg: " + avgMysqlTime + "ms");
  433.  
  434.             Console.WriteLine("SQLite if you were connecting every time:");
  435.  
  436.             int laps = 100;
  437.             int overallTime;
  438.             Stopwatch timer = new Stopwatch();
  439.             int j = 0;
  440.             foreach (string table in Globals.listTableNames)
  441.             {
  442.                 overallTime = 0;
  443.                 for (int i = 0; i < laps; i++)
  444.                 {
  445.  
  446.                     timer.Start();
  447.  
  448.                     SQLiteConnection conn1 = new SQLiteConnection(connStringSqlite);
  449.                     conn1.Open();
  450.                     execReaderSqlite(new SQLiteCommand("select * from " + table, conn1));
  451.                     conn1.Close();
  452.  
  453.                     timer.Stop();
  454.                     overallTime += timer.Elapsed.Milliseconds;
  455.                     timer.Reset();
  456.                    
  457.                 }
  458.                 double avgTime = (double)overallTime / (double)laps;
  459.                 Console.WriteLine("[" + j + "]: " + table + " \t\t\toa: " + overallTime + "ms, \tavg: " + avgTime + "ms");
  460.                 j++;
  461.             }
  462.  
  463.  
  464.  
  465.            
  466.             Console.WriteLine("\nMySQL if you were connecting every time:");
  467.             laps = 10;
  468.             overallTime = 0;
  469.             j = 0;
  470.             foreach (string table in Globals.listTableNames)
  471.             {
  472.                 overallTime = 0;
  473.                 for (int i = 0; i < laps; i++)
  474.                 {
  475.  
  476.                     timer.Start();
  477.  
  478.                     MySqlConnection conn2 = new MySqlConnection(connStringMysql);
  479.                     conn2.Open();
  480.                     execReaderMysql(new MySqlCommand("select SQL_NO_CACHE * from " + table, conn2));
  481.                     conn2.Close();
  482.  
  483.                     timer.Stop();
  484.                     overallTime += timer.Elapsed.Milliseconds;
  485.                     timer.Reset();
  486.  
  487.                 }
  488.                 double avgTime = (double)overallTime / (double)laps;
  489.                 Console.WriteLine("[" + j + "]: " + table + " \t\t\toa: " + overallTime + "ms, \tavg: " + avgTime + "ms");
  490.                 j++;
  491.             }
  492.  
  493.  
  494.             Console.WriteLine("single table:");
  495.             timer.Reset();
  496.             timer.Start();
  497.             MySqlConnection conn4 = new MySqlConnection(connStringMysql);
  498.             conn4.Open();
  499.             execReaderMysql(new MySqlCommand("select * from submissions", conn4));
  500.             conn4.Close();
  501.             timer.Stop();
  502.             Console.WriteLine("\nelapsed time for sing subm table: " + timer.Elapsed.Milliseconds + "\n");
  503.  
  504.  
  505.  
  506.             Console.WriteLine("SQLite if you were connected:");
  507.             laps = 10;
  508.             timer.Reset();
  509.             j = 0;
  510.  
  511.             using (SQLiteConnection conn1 = new SQLiteConnection(connStringSqlite))
  512.             {
  513.                 conn1.Open();
  514.                 foreach (string table in Globals.listTableNames)
  515.                 {
  516.                     overallTime = 0;
  517.                     for (int i = 0; i < laps; i++)
  518.                     {
  519.  
  520.                         timer.Start();
  521.  
  522.  
  523.                         execReaderSqlite(new SQLiteCommand("select * from " + table, conn1));
  524.  
  525.  
  526.                         timer.Stop();
  527.                         overallTime += timer.Elapsed.Milliseconds;
  528.                         timer.Reset();
  529.  
  530.                     }
  531.                     double avgTime = (double)overallTime / (double)laps;
  532.                     Console.WriteLine("[" + j + "]: " + table + " \t\t\toa: " + overallTime + "ms, \tavg: " + avgTime + "ms");
  533.                     j++;
  534.                 }
  535.             }
  536.  
  537.  
  538.             connStringMysql = "Server=localhost;Uid=TokyoNyquiSD;Pwd=qazxsw;Database=tbmstu;";
  539.             Console.WriteLine("\nMySQL if you were connected:");
  540.             laps = 10;
  541.             overallTime = 0;
  542.             j = 0;
  543.  
  544.             using (MySqlConnection conn2 = new MySqlConnection(connStringMysql))
  545.             {
  546.                 conn2.Open();
  547.                 foreach (string table in Globals.listTableNames)
  548.                 {
  549.                     overallTime = 0;
  550.                     for (int i = 0; i < laps; i++)
  551.                     {
  552.  
  553.                         timer.Start();
  554.                         execReaderMysql(new MySqlCommand("select SQL_NO_CACHE * from " + table, conn2));
  555.                         timer.Stop();
  556.                         overallTime += timer.Elapsed.Milliseconds;
  557.                         timer.Reset();
  558.  
  559.                     }
  560.                     double avgTime = (double)overallTime / (double)laps;
  561.                     Console.WriteLine("[" + j + "]: " + table + " \t\t\toa: " + overallTime + "ms, \tavg: " + avgTime + "ms");
  562.                     j++;
  563.                 }
  564.             }
  565.            
  566.  
  567.  
  568.             Console.ReadLine();
  569.             return;
  570.  
  571.             Console.WriteLine("============================================================================");
  572.             Console.WriteLine("----------------------------------MYSQL-------------------------------------");
  573.             Console.WriteLine("============================================================================\n");
  574.  
  575.            
  576.             connStringMysql = "Server=localhost;Uid=TokyoNyquiSD;Pwd=qazxsw;Database=tbmstu;";
  577.             using (MySqlConnection conn2 = new MySqlConnection(connStringMysql))
  578.             {
  579.                 try
  580.                 {
  581.                     conn2.Open();
  582.                     Console.WriteLine("connection to MySQL has been set\n");
  583.  
  584.  
  585.                     stopWatch.Reset();
  586.                     stopWatch.Start();
  587.                     foreach (string table in Globals.listTableNames)
  588.                     {
  589.                         //if (!table.Equals("Sessions"))
  590.                         //{
  591.                             Console.WriteLine("inserting data into table " + ++tableNumMysql + ": " + table);
  592.  
  593.                             if (table.Equals("RelTasksModules") || table.Equals("FailedTests"))
  594.                             {
  595.                                 Console.WriteLine("\t-skipping-");
  596.                                 continue;
  597.                             }
  598.  
  599.                             if (table.Equals("Comments"))
  600.                             {
  601.                                 // BE AWARE OF SHITCODE HERE
  602.  
  603.                                 int divisionParts = 200;
  604.                                 int count = Globals.mapNameToDataList["Comments"].Count - (Globals.mapNameToDataList["Comments"].Count % 10);
  605.                                 int partSize = (int)(count / divisionParts);
  606.                                 int from = 0;
  607.  
  608.                                 //List<String> dataInRange = Globals.mapNameToDataList["Comments"].GetRange(7000, 10000);
  609.                                 //insertData("Comments", dataInRange, conn2);
  610.  
  611.                                 Console.WriteLine("\tall data count:" + count);
  612.  
  613.                                 int f = 0;
  614.                                 while (from < count)
  615.                                 {
  616.                                     /*if (from > 7000 && from < 8000) {
  617.                                         //List<String> datRange = Globals.mapNameToDataList["Comments"].GetRange(7200, 5000);
  618.                                        
  619.                                         //insertData("Comments", datRange, conn2);
  620.                                         from += partSize;
  621.                                         Console.WriteLine("asda");
  622.                                         continue;
  623.                                     }*/
  624.                                    
  625.  
  626.  
  627.                                     List<String> dataInRange = Globals.mapNameToDataList["Comments"].GetRange(from, partSize);
  628.  
  629.                                     if (dataInRange.Contains("'2013-04-04 20:10:17'"))
  630.                                     {
  631.                                         Console.WriteLine("found it");
  632.                                         from += partSize;
  633.                                         continue;
  634.                                     }
  635.  
  636.                                     Console.WriteLine("\t" + f++ + " data range:" + from + ".." + (from + partSize));
  637.                                     insertData("Comments", dataInRange, conn2);
  638.                                    
  639.  
  640.                                     from += partSize;
  641.                                 }
  642.                                 Console.WriteLine("\tdone");
  643.  
  644.                                 //Console.WriteLine("count:" + Globals.mapNameToDataList["Comments"].Count / 10);
  645.                                 //List<String> first50k = Globals.mapNameToDataList["Comments"].
  646.                                 //  GetRange(0, Globals.mapNameToDataList["Comments"].Count / 10);
  647.                                 //List<String> rest50k = Globals.mapNameToDataList["Comments"].
  648.                                     //GetRange(Globals.mapNameToDataList["Comments"].Count / 2,
  649.                                         //   Globals.mapNameToDataList["Comments"].Count - 1);
  650.  
  651.                                 //insertData("Comments", first50k, conn2);
  652.                                 //Console.WriteLine("\t30k");
  653.                                 //insertData("Comments", rest50k, conn2);
  654.                                 //Console.WriteLine("\trest");
  655.  
  656.                                
  657.  
  658.                                 continue;
  659.                             }
  660.  
  661.                             List<String> data = Globals.mapNameToDataList[table];
  662.                             insertData(table, data, conn2);
  663.  
  664.                             if (table.Equals("RelLanguagesModules"))
  665.                             {
  666.                                 //insert RelTasksModules first
  667.                                 List<String> specData = Globals.mapNameToDataList["RelTasksModules"];
  668.                                 insertData("RelTasksModules", specData, conn2);
  669.                                 Console.WriteLine("\tpre-added RelTasksModules");
  670.                                 continue;
  671.                             }
  672.  
  673.                            
  674.  
  675.                            
  676.                         //}
  677.                        
  678.  
  679.  
  680.                     }
  681.                     stopWatch.Stop();
  682.                    
  683.  
  684.  
  685.                     Console.WriteLine("\nelapsed time for " + tableNumMysql + " tables: " + stopWatch.Elapsed.ToString() + "\n");
  686.  
  687.  
  688.                 }
  689.                 catch (Exception e)
  690.                 {
  691.                     Console.WriteLine(e.Message);
  692.                 }
  693.  
  694.  
  695.                 //MySqlCommand cmd2 = new MySqlCommand("select table_name from information_schema.tables", conn2);
  696.                 //execReaderMysql(cmd2);
  697.                 //Console.WriteLine("cmd2 done");
  698.  
  699.                 MySqlCommand cmd3 = new MySqlCommand("select * from persons", conn2);
  700.                 execReaderMysql(cmd3);
  701.  
  702.                 Console.WriteLine("cmd3 done");
  703.  
  704.                 /*string q4 = "insert into persons(personid, firstname, lastname, login, password, avatar, recoversession, banned) values " + Globals.mapNameToData["Persons"];
  705.                 Console.WriteLine(q4);
  706.                 MySqlCommand cmd4 = new MySqlCommand(q4, conn2);
  707.                 cmd4.ExecuteNonQuery();
  708.                 Console.WriteLine("cmd4 done");*/
  709.  
  710.                 execReaderMysql(cmd3);
  711.  
  712.                 conn2.Dispose();
  713.  
  714.  
  715.                 Console.WriteLine("all done");
  716.                 Console.ReadLine();
  717.             }
  718.         }
  719.        
  720.     }
  721. }
Advertisement
Add Comment
Please, Sign In to add comment