コード例 #1
0
        public int DeleteUser(string Nick)
        {
            Driver.Connect();
            int result = Driver.Execute("DELETE FROM accounts WHERE name='{0}'", Nick);

            Driver.Close();
            return(result);
        }
コード例 #2
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;
     }
 }
コード例 #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;
     }
 }