Ejemplo n.º 1
0
        public int EA_Connect(String s)
        {
            String connStr = s + ";Connect=Cloud=protocol:http,address:10.22.23.82,port:1804;Data Source=" + s + ";DSN=" + s + ";Integrated Security=false;Persist Security Info=True;uid=www;pwd=www;User ID=www;Password=www;lazyload=false";

            //   String connStr = "Connect=Provider=MSDASQL5.1;port=1804;Password=www;Persist Security Info=True;User ID=www;Data Source=" + s + ";Initial Catalog=" + s;
            //   String connStr = "Dsn=" + s + ";uid=www;pwd=www;description=x;server={10.22.23.82};database=" + s + ";port=3306";
            EA_Close();
            try
            {
                bool w = eaRepository.OpenFile2(connStr, "www", "www");
                projektInterfejs = eaRepository.GetProjectInterface();

                if (w)
                {
                    schema = s;
                    if (IsProjectOpen(eaRepository))
                    {
                        return(0);
                    }
                    else
                    {
                        return(-2);
                    }
                }
                else
                {
                    return(-1);
                }
            }
            catch (Exception ex)
            {
                log("EA_Connect exc " + s + ": " + ex.Message, "Exc - EA_Connect");
                return(-3);
            }
        }