Beispiel #1
0
    public static bool Initialize()
    {
        MySQL1.SQL = MySQL1.mysql_init(IntPtr.Zero);
        bool result;

        if (MySQL1.Initialized = (MySQL1.SQL != IntPtr.Zero))
        {
            MySQL1.VersionId = MySQL1.mysql_get_client_version();
            MySQL1.Version   = new Version(MySQL1.mysql_get_client_version().ToString("#-##-##").Replace("-", "."));
            if (MySQL1.VersionId < MySQL1.MinVersion || MySQL1.VersionId > MySQL1.MaxVersion)
            {
                result = (MySQL1.Initialized = false);
                return(result);
            }
        }
        result = MySQL1.Initialized;
        return(result);
    }