Esempio n. 1
0
        internal static void TestConnection(string connectionString)
        {
            SqlAzManStorage.VerifyStorageDB(connectionString);
            SqlAzManStorage storage   = new SqlAzManStorage(connectionString);
            string          dbVersion = storage.DatabaseVesion;
            string          netsqlazmanRunTimeVersion = storage.GetType().Assembly.GetName().Version.ToString();

            if (!String.Equals(netsqlazmanRunTimeVersion.Substring(0, 6), dbVersion.Substring(0, 6), StringComparison.InvariantCultureIgnoreCase))
            {
                MessageBox.Show(String.Format("NetSqlAzMan Run-Time Version: {0}\r\nNetSqlAzMan Database Version: {1}", netsqlazmanRunTimeVersion, dbVersion), "Warning: Version mismatch", MessageBoxButtons.OK, MessageBoxIcon.Warning);
            }
        }
        private void TestConnection(string connectionString)
        {
            SqlAzManStorage.VerifyStorageDB(connectionString);
            SqlAzManStorage storage   = new SqlAzManStorage(connectionString);
            string          dbVersion = storage.DatabaseVesion;
            string          netsqlazmanRunTimeVersion = storage.GetType().Assembly.GetName().Version.ToString();

            if (!String.Equals(netsqlazmanRunTimeVersion.Substring(0, 6), dbVersion.Substring(0, 6), StringComparison.InvariantCultureIgnoreCase))
            {
                this.Page.ClientScript.RegisterStartupScript(typeof(string), "postBackAlert",
                                                             String.Format("window.alert('{0}');", String.Format("Warning: Version mismatch !!!\\r\\nNetSqlAzMan Run-Time Version: {0}\r\nNetSqlAzMan Database Version: {1}", netsqlazmanRunTimeVersion, dbVersion)), true);
            }
        }