Exemplo n.º 1
0
        // Check or refresh dbface
        public bool TestDbFace(ref DbFace dbface)
        {
            if (!string.IsNullOrEmpty(dbface.LastError))
            {
                dbface.Dispose();
                dbface = new DbFace();
                // try it out now-- might fail!
                dbface.GetConnection();
                if (!string.IsNullOrEmpty(dbface.LastError))
                {
                    status.Add("ERROR: Count not connect to the database.");
                    Thread.Sleep(1000);
                    return false;
                }
            }

            return true;
        }