2 using System.Collections.Generic;
5 using MySql.Data.MySqlClient;
11 static protected MySqlConnection _dbh = null;
12 static public MySqlConnection dbh
17 static protected Logger _log;
18 static public Logger log
23 static void Main(string[] args)
25 System.IO.StreamWriter fileout = new System.IO.StreamWriter("kelsier.log", false);
26 fileout.AutoFlush = true;
27 System.IO.TextWriter[] outputs = {Console.Out, fileout};
28 _log = new Logger(outputs, outputs, outputs);
30 _dbh = new MySqlConnection(Properties.Settings.Default.dbstr);
36 catch (MySqlException e)
38 log.error("Error: {0}", e.ToString());
41 MySqlCommand query = new MySqlCommand("SELECT 1+3", dbh);
42 log.debug("1 + 3 = {0}", query.ExecuteScalar().ToString());
45 Console.Write("Key to quit...");