Пример #1
0
        internal void GetLiteralQuotes(string method, out string quotePrefix, out string quoteSuffix)
        {
            CheckStateOpen(method);
            OleDbConnectionPoolGroupProviderInfo info = ProviderInfo;

            if (info.HasQuoteFix)
            {
                quotePrefix = info.QuotePrefix;
                quoteSuffix = info.QuoteSuffix;
            }
            else
            {
                OleDbConnectionInternal connection = GetOpenConnection();
                quotePrefix = connection.GetLiteralInfo(ODB.DBLITERAL_QUOTE_PREFIX);
                quoteSuffix = connection.GetLiteralInfo(ODB.DBLITERAL_QUOTE_SUFFIX);
                if (null == quotePrefix)
                {
                    quotePrefix = "";
                }
                if (null == quoteSuffix)
                {
                    quoteSuffix = quotePrefix;
                }
                info.SetQuoteFix(quotePrefix, quoteSuffix);
            }
        }
Пример #2
0
        internal void GetLiteralQuotes(string method, out string quotePrefix, out string quoteSuffix)
        {
            this.CheckStateOpen(method);
            OleDbConnectionPoolGroupProviderInfo providerInfo = this.ProviderInfo;

            if (providerInfo.HasQuoteFix)
            {
                quotePrefix = providerInfo.QuotePrefix;
                quoteSuffix = providerInfo.QuoteSuffix;
            }
            else
            {
                OleDbConnectionInternal openConnection = this.GetOpenConnection();
                quotePrefix = openConnection.GetLiteralInfo(15);
                quoteSuffix = openConnection.GetLiteralInfo(0x1c);
                if (quotePrefix == null)
                {
                    quotePrefix = "";
                }
                if (quoteSuffix == null)
                {
                    quoteSuffix = quotePrefix;
                }
                providerInfo.SetQuoteFix(quotePrefix, quoteSuffix);
            }
        }