ChangePassword() public method

public ChangePassword ( string newpsd ) : bool
newpsd string
return bool
Example #1
0
        static void ChangePassword()
        {
            try
            {
                string dbPath = "E:\\data.db";

                SqlLiteDBHelper db = new SqlLiteDBHelper(dbPath);
                bool ret = db.ChangePassword("2014Andwho0107");
                if (ret)
                {
                    Console.WriteLine("修改数据库密码成功");
                }
                else
                {
                    Console.WriteLine("修改数据库密码失败");
                }
            }
            catch (Exception ex)
            {
                Console.WriteLine("修改数据库密码失败:" + ex.ToString());
            }
        }
Example #2
0
        static void ChangePassword()
        {
            try
            {
                string dbPath = "E:\\data.db";

                SqlLiteDBHelper db  = new SqlLiteDBHelper(dbPath);
                bool            ret = db.ChangePassword("2014Andwho0107");
                if (ret)
                {
                    Console.WriteLine("修改数据库密码成功");
                }
                else
                {
                    Console.WriteLine("修改数据库密码失败");
                }
            }
            catch (Exception ex)
            {
                Console.WriteLine("修改数据库密码失败:" + ex.ToString());
            }
        }