Ejemplo n.º 1
0
        public static bool TryCreateDynamic(String assemblyName, String className, SqlDBCredentials credentials, out Object outVal, bool checkDeclarations = false, SoftwareVersion version = null, Type defaultDSType = null, bool readOnly = false)
        {
            bool retVal = false;

            outVal = null;
            try
            {
                outVal = DataSourceFactory.CreateDynamic(assemblyName, className, credentials, checkDeclarations, version, defaultDSType);
                retVal = true;
            }
            catch
            {
            }
            return(retVal);
        }
Ejemplo n.º 2
0
        public static bool TryCreate <T>(SqlDBCredentials credentials, out T outVal, bool checkVersion = true, bool checkDeclarations = false, SoftwareVersion version = null, Type defaultDSType = null, bool readOnly = false)
        {
            bool retVal = false;

            outVal = default(T);
            try
            {
                outVal = DataSourceFactory.Create <T>(credentials, checkVersion, checkDeclarations, version, defaultDSType);
                retVal = true;
            }
            catch
            {
            }
            return(retVal);
        }