public static void SetPostgresConnectionString(string connString)
        {
            VConnection vconn = VConnection.Get();

            vconn.Db_Type = DatabaseType.DB_POSTGRESQL;
            vconn.SetAttributes(connString);
            vconn.GetDatabase().SetConnectionString(connString);
            DB.SetDBTarget(VConnection.Get());
            connectionString = connString;
        }
        public static void SetOracleConnectionString(string connString)
        {
            VConnection vconn = VConnection.Get();

            vconn.Db_Type = DatabaseType.DB_ORACLE;
            vconn.SetAttributes(connString);
            vconn.GetDatabase().SetConnectionString(connString);
            DB.SetDBTarget(VConnection.Get());
            connectionString = connString;
        }
        public static string CreateConnectionString()
        {
            if (DataBase.DB.UseMigratedConnection)
            {
                if (DataBase.DB.MigrationConnection != null && DataBase.DB.MigrationConnection != "")
                {
                    VConnection vconn = VConnection.Get();
                    vconn.SetAttributes(DataBase.DB.MigrationConnection);

                    return(DataBase.DB.MigrationConnection);
                }


                return("");// Ini.CreateConnectionString(WindowMigration.MDialog.GetMConnection());
            }
            else
            {
                if (connectionString == null)
                {
                    //connectionString =  System.Configuration.ConfigurationSettings.AppSettings["oracleConnectionString"];
                    VConnection vconn = VConnection.Get();
                    connectionString = System.Configuration.ConfigurationManager.AppSettings["oracleConnectionString"];

                    if (!string.IsNullOrEmpty(connectionString))
                    {
                        vconn.Db_Type    = DatabaseType.DB_ORACLE;
                        connectionString = TrimUnicode(connectionString);
                        vconn.SetAttributes(connectionString);
                        vconn.GetDatabase().SetConnectionString(connectionString);
                        return(connectionString);
                    }
                    connectionString = System.Configuration.ConfigurationManager.AppSettings["PostgreSQLConnectionString"];
                    if (!string.IsNullOrEmpty(connectionString))
                    {
                        vconn.Db_Type = DatabaseType.DB_POSTGRESQL;
                        vconn.SetAttributes(connectionString);
                        vconn.GetDatabase().SetConnectionString(connectionString);
                        return(connectionString);
                    }
                    connectionString = System.Configuration.ConfigurationManager.AppSettings["PostgreSQLPlusConnectionString"];
                    if (!string.IsNullOrEmpty(connectionString))
                    {
                        vconn.Db_Type = DatabaseType.DB_POSTGRESQL;
                        vconn.SetAttributes(connectionString);
                        vconn.GetDatabase().SetConnectionString(connectionString);
                        return(connectionString);
                    }
                    connectionString = System.Configuration.ConfigurationManager.AppSettings["MSSQLConnectionString"];
                    if (!string.IsNullOrEmpty(connectionString))
                    {
                        vconn.Db_Type = DatabaseType.DB_MSSQL;
                        vconn.SetAttributes(connectionString);
                        vconn.GetDatabase().SetConnectionString(connectionString);
                        return(connectionString);
                    }


                    // connectionString =  vconn.CreateDBConnectionString();
                    //return Ini.CreateConnectionString(vconn);
                }

                return(connectionString);

                //VConnection vconn = VConnection.Get();
                // return Ini.CreateConnectionString(vconn);
            }

            //s_conn.Add(1, constr);


            //}
            //return constr;   //return the connection string to the user
        }