Roy,
Have a look in the registry on any machine that has MDAC 2.5 or later
installed.
When you say registry are you talking about the ProviderName.reg files. My
(atl) provider does not seem to have one, I believe it was registered
automatically. The closest I have come to finding it is a file called
"REGISTRY" which just contains binary data, and a file called .rgs. But I
have a feeling that the provider is registered successfully as I can view it
in Borland Builder's list of available Ole Db providers, and I have
successfully created a client that can access it??? (Using Regedit I can
only find what I showed you last time).
Now I think we are looking at an oledb provider that does not implement
all of the required interfaces.
I am sure this is true!!!!
and specifically, have you implemented the IDBSchemaRowset interface?
I believe I have (to a degree) but I don't really understand what is going
on here (I just went through Lon Fishers article step by step, which told me
what to do but not always why!). In my CDFapSess.h class I have the
following three implementations for:
class CCDFapSessionTRSchemaRowset;
class CCDFapSessionColSchemaRowset;
class CCDFapSessionPTSchemaRowset;
i.e....
class CCDFapSessionTRSchemaRowset :
public CSchemaRowsetImpl< CCDFapSessionTRSchemaRowset, CTABLESRow,
CCDFapSession>
{
public:
BEGIN_PROPSET_MAP(CCDFapSessionTRSchemaRowset)
BEGIN_PROPERTY_SET(DBPROPSET_ROWSET)
PROPERTY_INFO_ENTRY(IAccessor)
PROPERTY_INFO_ENTRY(IColumnsInfo)
PROPERTY_INFO_ENTRY(IConvertType)
PROPERTY_INFO_ENTRY(IRowset)
PROPERTY_INFO_ENTRY(IRowsetIdentity)
PROPERTY_INFO_ENTRY(IRowsetInfo)
PROPERTY_INFO_ENTRY(CANFETCHBACKWARDS)
PROPERTY_INFO_ENTRY(CANHOLDROWS)
PROPERTY_INFO_ENTRY(CANSCROLLBACKWARDS)
PROPERTY_INFO_ENTRY_VALUE(MAXOPENROWS, 0)
PROPERTY_INFO_ENTRY_VALUE(MAXROWS, 0)
END_PROPERTY_SET(DBPROPSET_ROWSET)
END_PROPSET_MAP()
HRESULT Execute(LONG* pcRowsAffected, ULONG, const VARIANT*)
{
USES_CONVERSION;
//CTextFile tf;
CTABLESRow trData;
lstrcpyW(trData.m_szType, OLESTR("TABLE"));
lstrcpyW(trData.m_szDesc, OLESTR("The Text File Table"));
TCHAR szFile[255];
_tcscpy(szFile, _T("c:\\code\\myprov\\sample.txt"));
lstrcpynW(trData.m_szTable, T2OLE(szFile),
SIZEOF_MEMBER(CTABLESRow, m_szTable));
if (!m_rgRowData.Add(trData))
return E_OUTOFMEMORY;
*pcRowsAffected = 1;
return S_OK;
}//END OF Execute
It will look into it further as it is not implemented properly yet.
Thanks,
Duncan.