Esempio n. 1
0
        public int DeleteUser(string Nick)
        {
            Driver.Connect();
            int result = Driver.Execute("DELETE FROM accounts WHERE name='{0}'", Nick);

            Driver.Close();
            return(result);
        }
 /// <summary>
 /// Creates the connection to the database, and handles
 /// the excpetion (if any) that are thrown
 /// </summary>
 public void Connect()
 {
     try
     {
         Driver = new DatabaseDriver();
         Driver.Connect();
     }
     catch (Exception E)
     {
         Console.WriteLine("Database Connect Error: " +
             Environment.NewLine +
             E.Message +
             Environment.NewLine
         );
         Console.WriteLine("Forcing Server Shutdown...");
         Server.Shutdown();
         throw E;
     }
 }
Esempio n. 3
0
 /// <summary>
 /// Creates the connection to the database, and handles
 /// the excpetion (if any) that are thrown
 /// </summary>
 public void Connect()
 {
     try
     {
         Driver = new DatabaseDriver();
         Driver.Connect();
     }
     catch (Exception E)
     {
         Console.WriteLine("Database Connect Error: " +
                           Environment.NewLine +
                           E.Message +
                           Environment.NewLine
                           );
         Console.WriteLine("Forcing Server Shutdown...");
         Server.Shutdown();
         throw E;
     }
 }