Hi All,
I have (am developing) an OLE DB provider for a proprietary database format.
Among other things, I'd like to be able to browse the table contents from
the Server Explorer built into the Visual Studio 2003 IDE. At this point, I
am able to connect to my provider and browse the schema information (tables,
columns). However, an attempt to "Retrieve Data from Table" results in an
error message: "Item cannot be found in the collection corresponding to the
requested name or ordinal". I have verified in debugger that
IOpenRowset::OpenRowset() is not called. The message looks like something
originating in ADO (or ADO.Net?), perhaps a missing property? I have checked
which properties are requested from the data source object (session is not
queried) and found nothing suspicious.
My data provider supports IOpenRowset only, it doesn't create or support
commands. I have tried to connect to it from Visual Studio 2005 beta and
noticed that it tries to call IOpenRowset::OpenRowset() but passes in an SQL
statement instead of the table name! (the data source exposes
DBPROP_SQLSUPPORT with DBPROPVAL_SQL_NONE value but it doesn't seem to be
queried). Does Visual Studio 2003 also expect browsable OLE DB providers to
suport SQL unconditionally? What else might I be missing?
Thanks in advance for any ideas,
...Max...
Anton Klimov [MS] - 30 Sep 2005 00:35 GMT
Have you set OLEDB_SERVICES key for your provider under the corresponding
HKCR\CLISID\ ?

Signature
This posting is provided "AS IS" with no warranties, and confers no rights.
> Hi All,
>
[quoted text clipped - 20 lines]
> Thanks in advance for any ideas,
> ....Max...
Max Motovilov - 30 Sep 2005 00:53 GMT
This should be doing the trick, shouldn't it? Part of what the ATL wizard
generated for me...
...Max...
================ Registrar file =================
HKCR
{
MFOLEDB.MFB.1 = s 'MapFrame MFB Database'
{
CLSID = s '{685BE5D0-2A20-4FD6-9924-867A965AEFA5}'
}
MFOLEDB.MFB = s 'MapFrame MFB Database'
{
CLSID = s '{685BE5D0-2A20-4FD6-9924-867A965AEFA5}'
CurVer = s 'MFOLEDB.MFB.1'
}
NoRemove CLSID
{
ForceRemove {685BE5D0-2A20-4FD6-9924-867A965AEFA5} = s 'MapFrame MFB
Database'
{
ProgID = s 'MFOLEDB.MFB.1'
VersionIndependentProgID = s 'MFOLEDB.MFB'
InprocServer32 = s '%MODULE%'
{
val ThreadingModel = s 'Apartment'
}
'OLE DB Provider' = s 'MapFrame MFB Database'
val AppID = s '%APPID%'
val OLEDB_SERVICES = d '4294967295'
'TypeLib' = s '{79AF4CFD-CC20-4D25-B802-23983204469B}'
}
}
}
===========================================
> Have you set OLEDB_SERVICES key for your provider under the corresponding
> HKCR\CLISID\ ?