Beispiel #1
0
        internal DBPropSet(UnsafeNativeMethods.IRowsetInfo properties, PropertyIDSet propidset, out OleDbHResult hr) : this()
        {
            int cPropertyIDSets = 0;

            if (propidset != null)
            {
                cPropertyIDSets = propidset.Count;
            }
            Bid.Trace("<oledb.IRowsetInfo.GetProperties|API|OLEDB>\n");
            hr = properties.GetProperties(cPropertyIDSets, propidset, out this.propertySetCount, out this.handle);
            Bid.Trace("<oledb.IRowsetInfo.GetProperties|API|OLEDB|RET> %08X{HRESULT}\n", hr);
            if (hr < OleDbHResult.S_OK)
            {
                this.SetLastErrorInfo(hr);
            }
        }
Beispiel #2
0
        internal DBPropSet(UnsafeNativeMethods.IRowsetInfo properties, PropertyIDSet propidset, out OleDbHResult hr) : this()
        {
            Debug.Assert(null != properties, "null IRowsetInfo");

            int propidsetcount = 0;

            if (null != propidset)
            {
                propidsetcount = propidset.Count;
            }
            hr = properties.GetProperties(propidsetcount, propidset, out this.propertySetCount, out base.handle);

            if (hr < 0)
            {
                // remember the last HRESULT. Note we do not want to raise exception now to avoid breaking change from Orcas RTM/SP1
                SetLastErrorInfo(hr);
            }
        }