예제 #1
0
        internal bool SQLGetFunctions(ODBC32.SQL_API odbcFunction)
        {
            //SQLGetFunctions
            ODBC32.RetCode retcode;
            short          fExists;

            Debug.Assert((short)odbcFunction != 0, "SQL_API_ALL_FUNCTIONS is not supported");
            OdbcConnectionHandle connectionHandle = ConnectionHandle;

            if (null != connectionHandle)
            {
                retcode = connectionHandle.GetFunctions(odbcFunction, out fExists);
            }
            else
            {
                Debug.Fail("GetFunctions called and ConnectionHandle is null (connection is disposed?)");
                throw ODBC.ConnectionClosed();
            }

            if (retcode != ODBC32.RetCode.SUCCESS)
            {
                this.HandleError(connectionHandle, retcode);
            }

            if (fExists == 0)
            {
                return(false);
            }
            else
            {
                return(true);
            }
        }