Ejemplo n.º 1
0
        private void setServerInfo(ref Sql8rServer s, string dbConn)
        {
            var cn = new OdbcConnection(dbConn);

            cn.Open();
            string version = cn.ServerVersion;

            s.SetServerInfo(version, version, version, 0);
        }
Ejemplo n.º 2
0
        private void setServerInfo(ref Sql8rServer s, string dbConn)
        {
            var dtServerInfo  = new DataTable("ServerInfo");
            var sdaServerInfo = new SqlDataAdapter(sqlServerInfo, dbConn);

            sdaServerInfo.Fill(dtServerInfo);
            if (dtServerInfo.Rows.Count > 0)
            {
                DataRow drServerInfo   = dtServerInfo.Rows[0];
                string  productVersion = drServerInfo[0].ToString();
                string  productLevel   = drServerInfo[1].ToString();
                string  edition        = drServerInfo[2].ToString();
                int     engineEdition  = int.Parse(drServerInfo[3].ToString());

                s.SetServerInfo(productVersion, productLevel, edition, engineEdition);
            }
        }